Reformat and clean up portal scripts

This commit is contained in:
P0nk
2021-09-09 23:35:59 +02:00
parent d893309b4f
commit a78ca88a02
435 changed files with 2712 additions and 2287 deletions

View File

@@ -20,17 +20,22 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
function enter(pi) {
if(!(pi.haveItem(4031507, 5) && pi.haveItem(4031508, 5) && pi.isQuestStarted(6002))) {
if (!(pi.haveItem(4031507, 5) && pi.haveItem(4031508, 5) && pi.isQuestStarted(6002))) {
pi.removeAll(4031507);
pi.removeAll(4031508);
}
var pCount = pi.getPlayer().countItem(4031507);
var rCount = pi.getPlayer().countItem(4031508);
if(pCount > 5) pi.gainItem(4031507, -1 * (pCount - 5));
if(rCount > 5) pi.gainItem(4031508, -1 * (rCount - 5));
pi.playPortalSound(); pi.warp(230000003, "out00");
if (pCount > 5) {
pi.gainItem(4031507, -1 * (pCount - 5));
}
if (rCount > 5) {
pi.gainItem(4031508, -1 * (rCount - 5));
}
pi.playPortalSound();
pi.warp(230000003, "out00");
return true;
}