I've been trying to code a "starter pack" that play need to get 30 etc item and trade for some equips and he would choose by his job, I don't have sucess, anyone could help?
Printable View
I've been trying to code a "starter pack" that play need to get 30 etc item and trade for some equips and he would choose by his job, I don't have sucess, anyone could help?
tell us what items the player has to collect and what happens after he collects the items
Edit the stuff
PHP Code:var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
cm.dispose();
return;
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if (cm.haveItem(shellid, 30)) {
cm.sendNext("Which job would you like?");
cm.gainItem(shellid, -30);
} else {
cm.sendOk("You do not have 30 snail shells");
cm.dispose();
}
} else if (status == 1) {
cm.sendSimple("#L1#Warrior\r\n#L2#Magician\r\n#L3#Thief\r\n#L4#Archer\r\n#L5#Pirate");
}else if (selection == 1) {
cm.gainItem(item, amount);
cm.dispose();
}else if (selection == 2) {
cm.gainItem(item, amount);
cm.dispose();
}else if (selection == 3) {
cm.gainItem(item, amount);
cm.dispose();
}else if (selection == 4) {
cm.gainItem(item, amount);
cm.dispose();
}else if (selection == 5) {
cm.gainItem(item, amount);
cm.dispose();
}
}
}
It works a little bit different than I wanted (75% working). When I click to choose my pack, I get dc'ed.
Any idea, guys?PHP Code:var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}else if (mode == 0){
cm.dispose();
return;
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if (cm.haveItem(4000019, 30)) {
cm.sendNext("Which job would you like?");
cm.gainItem(4000019, -30);
} else {
cm.sendOk("You do not have 30 snail shells");
cm.dispose();
}
} else if (status == 1) {
cm.sendSimple("#L1#Warrior\r\n#L2#Magician\r\n#L3#Thief\r\n#L4#Archer\r\n#L5#Pirate");
}else if (selection == 1) {
cm.gainItem(2022282, 2); // Elixir
cm.gainItem(1302082, 1); // Bandana
cm.gainItem(2000005, 100); // Pot
cm.gainItem(1302020, 1); // Maple
cm.warp(100000000, 0);
cm.sendOk("Enjoy #rFlameStory#k!");
cm.getPlayer().maxAllSkills();
cm.dispose();
}else if (selection == 2) {
cm.gainItem(2022282, 2); // Elixir
cm.gainItem(1302082, 1); // Bandana
cm.gainItem(2000005, 100); // Pot
cm.gainItem(1382009, 1); // Maple
cm.warp(100000000, 0);
cm.sendOk("Enjoy #rFlameStory#k!");
cm.getPlayer().maxAllSkills();
cm.dispose();
}else if (selection == 3) {
cm.gainItem(2022282, 2); // Elixir
cm.gainItem(1302082, 1); // Bandana
cm.gainItem(2000005, 100); // Pot
cm.gainItem(1472030, 1); // Maple
cm.warp(100000000, 0);
cm.sendOk("Enjoy #rFlameStory#k!");
cm.getPlayer().maxAllSkills();
cm.dispose();
}else if (selection == 4) {
cm.gainItem(2022282, 2); // Elixir
cm.gainItem(1302082, 1); // Bandana
cm.gainItem(2000005, 100); // Pot
cm.gainItem(1452016, 1); // Maple
cm.warp(100000000, 0);
cm.sendOk("Enjoy #rFlameStory#k!");
cm.getPlayer().maxAllSkills();
cm.dispose();
} else if (selection == 5) {
cm.gainItem(2022282, 2); // Elixir
cm.gainItem(1302082, 1); // Bandana
cm.gainItem(2000005, 100); // Pot
cm.gainItem(1492020, 1); // Maple
cm.warp(100000000, 0);
cm.sendOk("Enjoy #rFlameStory#k!");
cm.getPlayer().maxAllSkills();
cm.dispose();
}
}
}
use cm.getPlayer().message("Enjoy FlameStory!"); or
cm.getPlayer().dropMessage("Enjoy FlameStory!"); instead of cm.sendOk("Enjoy #rFlameStory#k!");
It says: "This NPC isn't working" but I still get my equips I just don't know if I get the maxskills.
can i see your maplecharacter.java
Make sure you have maxAllSkills function within MapleCharacter.
Thanks for try to help me, I've found another way to use Max Skll! Thanks guys!