Files
sweetgum-server/scripts/portal/gendergo.js
ronancpl 10dc1f03e7 Pet Snail expiration + Scripted portal sound effects
Fixed pet Snail not expiring properly (being removed from inventory when the time's up).
Broadcasted code update for most of the missing portal sound effects for portal scripts. It is expected for all scripted portals now to play the sound effect when traversing it.
2018-02-11 21:19:30 -02:00

20 lines
688 B
JavaScript

function enter(pi) {
var map = pi.getPlayer().getMap();
if(pi.getPortal().getName() == "female00") {
if (pi.getPlayer().getGender() == 1) {
pi.warp(map.getId(), "female01");
return true;
} else {
pi.message("This portal leads to the girls' area, try the portal at the other side.");
return false;
}
} else {
if (pi.getPlayer().getGender() == 0) {
pi.playPortalSound(); pi.warp(map.getId(), "male01");
return true;
} else {
pi.message("This portal leads to the boys' area, try the portal at the other side.");
return false;
}
}
}