Newbie Spellweaver
- Joined
- Jan 18, 2014
- Messages
- 26
- Reaction score
- 0
So, I've made a script where an NPC will teleport a player into a jump quest. But, as soon as they select a map, it teleports them there, then it crashes the client? Meh XD
Code:
/**** Script: Jump Quest NPC
* Author: Delta / DigitalAbuse
***/
importPackage(Packages.tools);
maps = [
["Valley of Heroes", 610020000], ["Breath of Lava", 280020000], ["Ghost Chimney", 682000200],
["Ola Ola", 109030002], ["Fitness Test", 109040000], ["Forest of Patience", 101000100],
["Deep Forest of Patience", 105040310]
];
function start() {
var talk = "Hello, I'm #rBunurt#k, the #rJump Quest#k NPC!\r\nWhat jump quest will you be doing today?";
for(var j = 0; j < maps.length; j++)
talk += "\r\n#L"+j+"#"+maps[j][0]+"#l";
cm.sendSimple(talk);
}
function action(m, t, s) {
cm.dispose();
if(m > 0){
cm.warp(maps[s][1]);
cm.sendOk("Make it to the top for a prize!");
cm.getClient().getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(6, "#h # has started the Jump Quest!").getBytes());
}
}