- Joined
- Jan 1, 2009
- Messages
- 105
- Reaction score
- 6
This code can be set to any npc you want,
Item -
Change the bold text to the id of the item you want to give them then change the purple text to the amount you want them to receive
-----------------------------------------
Mesos -
Change the bold text to the amount of mesos you want them receiving
-----------------------------------------
State 1 = Beginner
State 2 = Theif
State 3 = Warrior
state 4 = Archer
State 5 = Magician
State 6 = Pirate
Item -
Change the bold text to the id of the item you want to give them then change the purple text to the amount you want them to receive
Code:
player.giveItem([COLOR="Black"][B]ItemID[/B][/COLOR], [SIZE="4"][COLOR="DarkOrchid"]ItemAmount[/COLOR][/SIZE]);
Mesos -
Change the bold text to the amount of mesos you want them receiving
Code:
player.giveMesos([B][COLOR="Black"]Meso Amount[/COLOR][/B]);
State 1 = Beginner
State 2 = Theif
State 3 = Warrior
state 4 = Archer
State 5 = Magician
State 6 = Pirate
Code:
void npc_main(NPC @npc) {
int state = npc.getState();
Player @player = npc.getPlayer();
if (state == 0) {
npc.addText("What do you want your started pack to be? \r\n#L0##bBeginner#l\r\n#L1#Theif#l\r\n#L2#Warrior#l\r\n#L3#Archer#l\r\n#L4#Magician#l\r\n#L5#Pirate#l\r\n#k");
}
else if (state == 1) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
else if (state == 2) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
else if (state == 3) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
else if(state == 4) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
else if(state == 5) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
else if(state == 6) {
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveItem(ItemID, ItemAmount);
player.giveMesos(Meso Amount);
}
npc.end();
}
Last edited: