Files
sweetgum-server/scripts/portal/obstacle.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

26 lines
824 B
JavaScript

/*
Author: Ronan
Map: Mushroom Castle - Deep Inside Mushroom Forest (106020300)
Right Portal
*/
function enter(pi){
if (pi.isQuestCompleted(2316)) {
if (pi.hasItem(2430014)) {
pi.gainItem(2430014, -1 * pi.getPlayer().getItemQuantity(2430014, false));
pi.message("You have used the Killer Mushroom Spore to open the way.");
}
pi.warp(106020400, 2);
return true;
} else if (pi.hasItem(2430015)) {
pi.gainItem(2430015, -1 * pi.getPlayer().getItemQuantity(2430015, false));
pi.message("You have used the Thorn Remover to clean the way.");
pi.playPortalSound(); pi.warp(106020400, 2);
return true;
}
pi.message("The overgrown vines is blocking the way.");
return false;
}