アバターセット販売NPC

Go down

アバターセット販売NPC

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

Code:
/*
Item set seller.
By Kars
*/

var status = -1;
var selectedSet = -1;
var set;
var text;
var cost = 1200000;

function start() {
action(1, 0, 0);
}

function action(mode, type, selection) {
if (mode != 1) {
cm.sendOk("Okay, see you later then!");
cm.dispose();
return;
} else
status++;
if (status == 0) {
cm.sendYesNo("Wanna get a set full set of items?\r\nIt'll only cost ya #r" + cost + " Mesos#k!");
} else if (status == 1) {
cm.sendSimple("Pick one then :\r\n#b#L0#Sun Quan Set (Magician)#l\r\n#L1#Guan Yu Set (Spearman/DK)#l\r\n#L2#Cao Cao Set (Hunter)#l\r\n#L3#Lunar Celebration Set (All jobs)#l\r\n#L4#Soccer Set (All) (No Effect)#l\r\n#L5#The Matrix Set (All)#l\r\n#L6#Detective Set (All)#l\r\n#L7#Shower Set (All)#l");
} else if (status == 2) {
text = "Are you sure you wanna pick the following items?#b";
selectedSet = selection;
if (cm.getChar().getGender() == 0) {
/* male */ var sets = new Array(new Array(1002446,1052041,1072243,1702033),new Array(1002437,1052035,1072236,1702034),new Array(1002445,1052040,1072242,1702035),new Array(1000027,1050124,1070007),new Array(1002512,1052056),new Array(1022009,1050050,1072111),new Array(1000008,1052029,1072200),new Array(1052078,1702088));
} else {
/* fmale */ var sets = new Array(new Array(1002446,1052041,1072243,1702033),new Array(1002437,1052035,1072236,1702034),new Array(1002445,1052040,1072242,1702035),new Array(1001039,1051138,1071019),new Array(1002512,1052056),new Array(1022009,1051040,1072111),new Array(1001013,1052029,1072200),new Array(1052078,1702088));
} set = sets[selectedSet];
for(var i = 0; i <set> cost) {
for(var i = 0; i < set.length; i++){
cm.gainItem(set[i],1);
}
cm.gainMeso(-cost);
} else {
cm.sendOk("You don't have#r " + cost + " Mesos#k!");
}
cm.dispose();
}
}
avatar
構築さん
Admin

Posts : 193
Join date : 2014/05/29

http://maplescience.forumjap.com

トップに戻る Go down

トップに戻る


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