P0ke
Posts : 62 Join date : 2011-05-29 Location : Chris's pants<3
| Subject: P0ke Coder app (I prefer being regular GM but if you need a simple scripter i can help) Tue Jun 14, 2011 4:04 pm | |
| What is ur name? Lisa He Short introduction about your self: I'm 18 and I love volleyball, my guinea pig and chris. C: How old are you? I am 18 LOL. Where do you live? NY. What is ur Timezone? GMT -5 How long are you able to be online/available per day? Pretty long. Like almost 8+ hours. Give us an Example of your work: I usually do my scripts while on VPS so i don't have much saved. - Code:
-
/** Javascript: Vote Point NPC By: [<3]P0ke Version 3 **/
var no = "You do not have enough #rvote points#k."; var options = ["How many Vote Points do I have", "Vote for NX", "Astaroth", "Bain", "Timeless Weapon"]; var items = [[], [], [1302133, 1332099, 1372058, 1382080, 1402072, 1412046, 1432061, 1442103, 1452085, 1462075, 1472100, 1482046, 1492048], [1492037, 1472086, 1452071, 1442078, 1402062, 1382068], [1492023, 1472068, 1462050, 1452057, 1432047, 1382057, 1372044, 1332074, 1332073, 1482023, 1442063, 1422037, 1412033, 1402046, 1322060, 1312037, 1302081]]; var choice = 0; var status = 0;
function start() { status = -1; action(1,0,0); }
function action(mode, type, selection) { if (mode != 1) { cm.dispose(); return; } else { status++; } if(status == 0) { cm.sendNext("Welcome to LegacyMS's Voting System."); }else if (status == 1) { var text = "What can I help you with?"; for(var i = 0; i< options.length; i++) text += "\r\n#r#L"+i+"#"+options[i]+"#l"; cm.sendSimple(text); } else if (status == 2) { choice = selection; if (choice == 0) { cm.sendOk("You have #r" + cm.getVotePoints() + "#k Vote Points. Keep voting<3"); cm.dispose(); } else if (choice == 1) { cm.sendOk("busy"); cm.dispose(); } else { var newTalk = "What can I help you with? Each "+options[choice]+" cost #r10 Vote Points#k"; for(i = 0; i< items[selection].length; i++) newTalk += "\r\n#L"+i+"##v"+items[selection][i]+"##l" +"#b#t"+items[selection][i]+"##k"; cm.sendSimple(newTalk); } } else if (status == 3) { if (cm.getVotePoints() >= 10) { cm.setVotePoints(-10); cm.gainItem(items[choice][selection], 1); } else { cm.sendOk(no); cm.dispose(); return; } } } vote point NPC - Code:
-
/** Javascript: Donation NPC By: [<3]P0ke **/
var status; var choice = 0; var things = [ /*Item*/ [1002584, 1002562, 1002662, 1072275, 1072004, 1072375, 1052081, 1051017, 1050018, 1102143, 1102174, 1102205, 1082175 , 1082176 , 1082177, 1012076, 1012132, 1012056, 1022082, 1022073, 1022088, 1032055, 1032033, 1032028, 1122002, 1122003, 1122004], /*Medal*/ [1142000, 1142001, 1142002, 1142003, 1142004, 1142005, 1142006, 1142007, 1142008, 1142009, 1142010, 1142011, 1142012, 1142013, 1142014, 1142015, 1142016, 1142017, 1142018, 1142019, 1142020, 1142021, 1142022, 1142023, 1142024, 1142025, 1142026, 1142027, 1142028, 1142020, 1142030, 1142031, 1142032, 1142033, 1142034, 1142035, 1142036, 1142037, 1142038, 1142039, 1142040, 1142041, 1142042, 1142043, 1142044, 1142045, 1142046, 1142047, 1142048, 1142049, 1142050, 1142051, 1142052, 1142053, 1142054, 1142055, 1142056, 1142057, 1142058, 1142059, 1142060, 1142061, 1142062, 1142063, 1142064, 1142065, 1142066, 1142067, 1142068, 1142069, 1142070, 1142071, 1142072], /*Chair*/ [3010020, 3010021, 3010022, 3010023, 3010024, 3010026, 3010027, 3010029, 3010030, 3010031, 3010032, 3010033, 3010034, 3010035, 3010036, 3010037, 3010038, 3010044, 3010048, 3010049, 3010050, 3010052, 3010054, 3010055, 3010056, 3010059, 3010068, 3010070, 3010074, 3010075, 3010077, 3010078, 3010079, 3010086, 3010087, 3010088, 3010089, 3010090, 3010091, 3010093, 3010094, 3010095, 3010096, 3010097, 3010100, 3010102, 3010103, 3010104, 3010107, 3010108, 3010109, 3010100, 3010112, 3010117, 3010118, 3010119, 3010120, 3010121, 3010122, 3010124, 3010125, 3010126, 3010127, 3010128, 3010136, 3010141, 3010142, 3010144, 3010145, 3010148, 3010149, 3010152, 3012001, 3012006, 3012007, 3012008, 3012009, 3012012, 3013000, 3013001]]; var amounts = [5,10,5]; var no = "You do not have enough donation points"; var yes = "Thank you for your donation!(:";
function start() { cm.sendNext("Welcome to #bArizonaMS#k Donator Point Exchange NPC #r#h ##k."); }
function action(mode, type, selection) { if (mode != 1) { cm.sendOk("Continue donating please<3"); cm.dispose(); return; } else { status++; } if (status == 1) { if (cm.getChar().isDonator() == true) { cm.sendSimple("What would you like for me to do for you? \r\n\r\n#r#L0#Check how much donation points I have#l \r\n#L1#Points for EQUIP#l \r\n#L2#Medal#l \r\n#L3#Custom Chairs#l \r\n#L4#Donation Point Information#l \r\n#L5#Regular GM Job#l \r\n#L6#Buy A Map#l \r\n#b***MORE TO COME SO KEEP DONATING<3***"); }else{ cm.sendOk("You are not a donor."); cm.dispose(); } } else if (status == 2) { choice = selection; if (choice == 0) { cm.sendOk("You currently have (#r" + cm.getPlayer().getDonatorPoints() + "#k) Donator Points."); } else if (choice > 0 && choice < 4) { var text = "What item would you like? Each item cost #r"+amounts[choice]+" Donor Points."; for (var i = 0; i < things[choice-1].length; i++) text += "\r\n#L"+i+"##v"+things[choice][i]+"##l"; cm.sendSimple(text); } else if (choice == 4) { cm.sendOk("#bDonation Point System#k \r\n\r\n$1 = 1 Point + 1 GM Scroll \r\n$5 = 10 Points + 10 GM Scrolls \r\n$10 = 25 Points + 25 GM Scrolls \r\n$20 = 55 Points + 25 GM Scrolls + 5 Event Trophy \r\n$40 = 110 Points + 25 GM Scrolls + 10 Event Trophy + #r~~~***DONOR STATUS***~~~ \r\n\r\nOther donation amounts will be included later on(:#k \r\n\r\n\r\n\r\n#bLOOK FORWARD FOR DONOR AIO NPC<3"); } else if (choice == 5) { cm.sendSimple("It cost #r40 Donator Points#k to get Regular GM Job. Do you want to continue? \r\n\r\n#r#L0#Yes#l \r\n#L1#No#l"); } else if (choice == 6) { cm.sendSimple("A house cost 10 Donation points. Once you have made it, there are no refunds or switching of map. \r\n\r\n#r#L2#Yes I understand#l \r\n#L3#I changed my mind#l"); } } else if (status == 3) { if (selection == 0) { if (cm.getPlayer().getDonatorPoints() >= 40) { cm.getPlayer().gainDonatorPoints(-40); cm.changeJob(900); cm.sendOk(yes); } else { cm.sendOk(no); } } else if (selection == 1 || selection == 3) { cm.sendOk(yes); } else if (selection == 2) { if (cm.getPlayer().getDonatorPoints() >= 10) { cm.getPlayer().gainDonatorPoints(-10); cm.gainItem(4032055, 1); cm.sendOk("Please give this ticket to #rP0ke#k when you see her."); } else { cm.sendOk(no); } } else { if (cm.getPlayer().getDonatorPoints() >= amounts[choice-1]) { cm.getPlayer().gainDonatorPoints(-amounts[choice-1]); cm.gainEqWithStat(things[choice-1][selection], 6969, 13337, 13337, 13337, 13337); cm.sendOk(yes); } else { cm.sendOk(no); } } cm.dispose(); } } donation NPC PS: Im moderate at best when it comes to coding.
Last edited by P0ke on Tue Jun 14, 2011 5:48 pm; edited 1 time in total | |
|