v62 転職NPC

Go down

v62 転職NPC

投稿 by 構築さん on 2014-05-30, 09:05

Code:
/*
* Coded by:
* Use: NPC Job Changer
*/

function start() {
status = -1;
action(1, 0, 0);
}

function action(mode, type, selection) {
if (mode == 1)
status++;
else {
cm.sendOk("#e#kOk, see you next time!");
cm.dispose();
return;
}
if (status == 0) {
cm.sendNext(" #e Hey there! With 10 or more rebirths, I can give you any job of your choice, for Free!");
} else if (status == 1) {

if (cm.getReborns() >= 10) {
cm.sendSimple("What would you like? #e\r\n#L0##d Rogue \r\n#L1##b Pirate \r\n#L2##g Archer \r\n#L3##r Magician \r\n#L4##k Swordman \r\n#L5##d Beginner \r\n#L6# 2nd Jobs ( Lvl 30+ ) \r\n#L7# 3rd Jobs ( Lvl 70+ ) \r\n#L8# 4th Jobs ( Lvl 120+ ) ");
} else {
cm.sendOk(" You don't have 10 or more reborns, sorry. ");
cm.dispose();
}

} else if (status == 2) {
if (selection == 0) {
cm.changeJobById(400);
cm.dispose();
} else if (selection == 1) {
cm.changeJobById(500);
cm.dispose();
} else if (selection == 2) {
cm.changeJobById(300);
cm.dispose();
} else if (selection == 3) {
cm.changeJobById(200);
cm.dispose();
} else if (selection == 4) {
cm.changeJobById(100);
cm.dispose();
} else if (selection == 5) {
cm.changeJobById(0);
cm.dispose();
} else if (selection == 6) {
if (cm.getLevel() >= 30) {
cm.sendSimple("Which 2nd job would you like? \r\n#L100# Magician \r\n#L101# Thief \r\n#L102# Pirate \r\n#L103# Warrior \r\n#L104# Bowman ");
} else {
cm.sendOk("You are not level 30 or higher.");
cm.dispose();
}
} else if (selection == 7) {
if (cm.getLevel() >= 70) {
cm.sendSimple("Which 3rd job would you like? \r\n#L105# Magician \r\n#L106# Thief \r\n#L107# Pirate \r\n#L108# Warrior \r\n#L109# Bowman ");
} else {
cm.sendOk("You are not level 70 or higher.");
}
} else if (selection == 8) {
if (cm.getLevel() >= 120) {
cm.sendSimple("Which 4th job would you like? \r\n#L110# Magician \r\n#L111# Thief \r\n#L112# Pirate \r\n#L113# Warrior \r\n#L114# Bowman ");
} else {
cm.sendOk("You are not level 120 or higher.");
}
}
} else if (status == 3) {
if (selection == 100) {
cm.sendSimple("Which 2nd job Magician would you like? \r\n#L200# Cleric \r\n#L201# Wizard (Ice/Lightning) \r\n#L202# Wizard (Fire/Poison) ");
} else if (selection == 101) {
cm.sendSimple("Which 2nd job Thief would you like? \r\n#L203# Assassin \r\n#L204# Bandit ");
} else if (selection == 102) {
cm.sendSimple("Which 2nd job Pirate would you like? \r\n#L205# Brawler \r\n#L206# Gunslinger ");
} else if (selection == 103) {
cm.sendSimple("Which 2nd job Warrior would you like? \r\n#L207# Fighter \r\n#L208# Page \r\n#L209# Spearman ");
} else if (selection == 104) {
cm.sendSimple("Which 2nd job Bowman would you like? \r\n#L210# Hunter \r\n#L211# Crossbowman ");

} else if (selection == 105) {
cm.sendSimple("Which 3rd job Magician would you like? \r\n#L212# Mage (Ice/Lightning) \r\n#L213# Mage (Fire/Poison) \r\n#L214# Priest ");
} else if (selection == 106) {
cm.sendSimple("Which 3rd job Thief would you like? \r\n#L215# Hermit \r\n#L216# Chief Bandit ");
} else if (selection == 107) {
cm.sendSimple("Which 3rd job Pirate would you like? \r\n#L217# Marauder \r\n#L218# Outlaw");
} else if (selection == 108) {
cm.sendSimple("Which 3rd job Warrior would you like? \r\n#L219# Crusader \r\n#L220# White Night \r\n#L221# Dragon Knight ");
} else if (selection == 109) {
cm.sendSimple("Which 3rd job Bowman would you like? \r\n#L222# Ranger \r\n#L223# Sniper ");

} else if (selection == 110) {
cm.sendSimple("Which 4th job Magician would you like? \r\n#L224# Arch Mage (Ice/Lightning) \r\n#L225# Arch Mage (Fire/Poison) \r\n#L226# Bishop ");
} else if (selection == 111) {
cm.sendSimple("Which 4th job Thief would you like? \r\n#L227# Night Lord \r\n#L228# Shadower ");
} else if (selection == 112) {
cm.sendSimple("Which 4th job Pirate would you like? \r\n#L229# Buccannear ( Viper ) \r\n#L230# Corsair ( Captain ) ");
} else if (selection == 113) {
cm.sendSimple("Which 4th job Warrior would you like? \r\n#L231# Hero \r\n#L232# Paladin \r\n#L233# Dark Knight");
} else if (selection == 114) {
cm.sendSimple("Which 4th job Bowman would you like? \r\n#L234# Bow Master \r\n#L235# Marksman");
}
} else if (status == 4) {
if (selection == 200) {
cm.changeJobById(230);
cm.dispose();
} else if (selection == 201) {
cm.changeJobById(220);
cm.dispose();
} else if (selection == 202) {
cm.changeJobById(210);
cm.dispose();
} else if (selection == 203) {
cm.changeJobById(410);
cm.dispose();
} else if (selection == 204) {
cm.changeJobById(420);
cm.dispose();
} else if (selection == 205) {
cm.changeJobById(510);
cm.dispose();
} else if (selection == 206) {
cm.changeJobById(520);
cm.dispose();
} else if (selection == 207) {
cm.changeJobById(110);
cm.dispose();
} else if (selection == 208) {
cm.changeJobById(120);
cm.dispose();
} else if (selection == 209) {
cm.changeJobById(130);
cm.dispose();
} else if (selection == 210) {
cm.changeJobById(310);
cm.dispose();
} else if (selection == 211) {
cm.changeJobById(320);
cm.dispose();
} else if (selection == 212) {
cm.changeJobById(211);
cm.dispose();
} else if (selection == 213) {
cm.changeJobById(221);
cm.dispose();
} else if (selection == 214) {
cm.changeJobById(231);
cm.dispose();
} else if (selection == 215) {
cm.changeJobById(231);
cm.dispose();
} else if (selection == 216) {
cm.changeJobById(421);
cm.dispose();
} else if (selection == 217) {
cm.changeJobById(511);
cm.dispose();
} else if (selection == 218) {
cm.changeJobById(521);
cm.dispose();
} else if (selection == 219) {
cm.changeJobById(111);
cm.dispose();
} else if (selection == 220) {
cm.changeJobById(121);
cm.dispose();
} else if (selection == 221) {
cm.changeJobById(131);
cm.dispose();
} else if (selection == 222) {
cm.changeJobById(131);
cm.dispose();
} else if (selection == 223) {
cm.changeJobById(131);
cm.dispose();
} else if (selection == 224) {
cm.changeJobById(222);
cm.dispose();
} else if (selection == 225) {
cm.changeJobById(212);
cm.dispose();
} else if (selection == 226) {
cm.changeJobById(232);
cm.dispose();
} else if (selection == 227) {
cm.changeJobById(412);
cm.dispose();
} else if (selection == 228) {
cm.changeJobById(422);
cm.dispose();
} else if (selection == 229) {
cm.changeJobById(512);
cm.dispose();
} else if (selection == 230) {
cm.changeJobById(522);
cm.dispose();
} else if (selection == 231) {
cm.changeJobById(112);
cm.dispose();
} else if (selection == 232) {
cm.changeJobById(122);
cm.dispose();
} else if (selection == 233) {
cm.changeJobById(132);
cm.dispose();
} else if (selection == 234) {
cm.changeJobById(312);
cm.dispose();
} else if (selection == 235) {
cm.changeJobById(322);
cm.dispose();
}
}
}
avatar
構築さん
Admin

Posts : 193
Join date : 2014/05/29

http://maplescience.forumjap.com

トップに戻る Go down

トップに戻る


 
Permissions in this forum:
返信投稿: 不可