Starter pack island system
Hello , i made this script that will give you a starter pack if you hunt 20 monsters in the map and give the items to the npc the npc will give you a starter pack and teleports you to henesys.
9100002.js ( if you want to change the npc you also have to change it in the 000000000.img.xml file)
PHP Code:
/* Starter pack Npc
by John (Johnverdonck on ragezone)
*/
function start() {
cm.sendNext("Hello , Welcome to Servername!! If you give me 20 #b#v4000300##k I will give you a starterpack and teleport you to Henesys.");
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
return;
}
if(cm.haveItem(4000300,20)) {
cm.gainItem(4000300,-20);
cm.warp(100000000);
cm.gainItem(5072000,1);
cm.gainItem(2000005,50);
cm.gainItem(2022179,10);
cm.gainItem(1012070,1);
cm.gainMeso(10000000);
cm.sendOk("Thank you! Press @help for the commands!");
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
This will add the monsters, npc and will block the portal
000000000.img.xml
replace the file in the link in this map : URPACK\WZ\Map.wz\Map\Map0
If you got some warp commands like @spinel just put this in your playercommands.java
PHP Code:
} else if (splitted[0].equals("@spinel")) {
if (player.getMapId() != 0) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9000020);
This will disable the command in the map the ''0'' in the command is the map and ''9000020'' is the npc that opens
Compile and Restart the server
This is my first release so please don't flame me :blushing:
Greets John
Re: Starter pack island system
You should remove this part from the command
PHP Code:
} else {
mc.dropMessage("You cannot use this command in this map.");
}
When people add commands, they put them anywhere, and that will fuck up their java file.
Re: Starter pack island system
Quote:
Originally Posted by
Shawn
You should remove this part from the command
PHP Code:
} else {
mc.dropMessage("You cannot use this command in this map.");
}
When people add commands, they put them anywhere, and that will fuck up their java file.
ok done
Re: Starter pack island system
a { missing in the script
PHP Code:
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
Re: Starter pack island system
Quote:
Originally Posted by
Alcandon
a { missing in the script
PHP Code:
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
Huh it's working fine for me
Re: Starter pack island system
Quote:
Originally Posted by
Alcandon
a { missing in the script
PHP Code:
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
Wrong.
There's enough brackets :p
Re: Starter pack island system
Quote:
Originally Posted by
Alcandon
a { missing in the script
PHP Code:
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
If there is only 1 line/command aftar a if/else You dont have to put { }
Re: Starter pack island system
Quote:
Originally Posted by
Alcandon
a { missing in the script
PHP Code:
} else
cm.sendOk("Sorry, you don't have 20 #b#v4000300##k! hunt them from the monsters in the map.");
cm.dispose();
}
JavaScript doesn't requie { at the end of if.
Re: Starter pack island system
Quote:
Originally Posted by
Saix
JavaScript doesn't requie { at the end of if.
I was talking about
} else {
but nevermind
Re: Starter pack island system
Quote:
Originally Posted by
horst
Hey i have a question... i replaced the 000000000.img.xml file there URPACK\WZ\Map.wz\Map\Map0 but wherer i get the npc oder the jar file: 9100002.js?
your repack\scripts\npc
Re: Starter pack island system
Quote:
Originally Posted by
horst
yeah i looked there already but the npc isn#t there...can i downlaod it
Copy another NPC file -> rename that file to the NPC's ID you want -> place the code inside of that file
Re: Starter pack island system
Quote:
Originally Posted by
billybombill
Copy another NPC file -> rename that file to the NPC's ID you want -> place the code inside of that file
... what kind of reaction do you want? Seriously these posts are useless as hell if you want more posts just go to otaku studios and talk about habbo hotel but seriously dont post such useless things it wont help anyone.
Now you could say this post is useless to but it isnt.. Im not only telling you but al the other readers of this post to fucking stop those weak flame posts or w/e they are.
on topic: it took long but im finnally on topic, it´s a pretty nice release for a beginner here but I think you dont want to act like a beginner, next time create something special and special doesnt mean codes completely by yourself you can leech w/e you need (just like everyone does here)
but give it a little touch from yourself the 'special' touch i name it:P
Next time try to make something that is useable for other people.
Finnaly im done!
Dstollie
Re: Starter pack island system
he was just telling the person how to add the NPC...
Re: Starter pack island system
Quote:
Originally Posted by
damien1114
he was just telling the person how to add the NPC...
Why dont you join the otaku community to? habbo hotel could use people who thinks the same sarcastic way
Re: Starter pack island system
Quote:
Originally Posted by
Dstollie
... what kind of reaction do you want? Seriously these posts are useless as hell if you want more posts just go to otaku studios and talk about habbo hotel but seriously dont post such useless things it wont help anyone.
Now you could say this post is useless to but it isnt.. Im not only telling you but al the other readers of this post to fucking stop those weak flame posts or w/e they are.
on topic: it took long but im finnally on topic, it´s a pretty nice release for a beginner here but I think you dont want to act like a beginner, next time create something special and special doesnt mean codes completely by yourself you can leech w/e you need (just like everyone does here)
but give it a little touch from yourself the 'special' touch i name it:P
Next time try to make something that is useable for other people.
Finnaly im done!
Dstollie
What do you mean waht kind of reaction? He had a problem, I had an answer, simple as that.
Quote:
Originally Posted by
Dstollie
Why dont you join the otaku community to? habbo hotel could use people who thinks the same sarcastic way
Why don't you? Go back to Otaku if your not going to help people, you seem to like talking about it so much anyways.
On Topic:
Simple but nice :D