Hey guys, first release.
This is an easy customizible NPC, that you can change yourself. Say you want to change the item traded from maple leaves to Golden Maple Leaves. Just change the variable at the top, and at the bottom, and on the selections. You can easily edit the items that are given to the character by changing the itemID and name. Enjoy!
This is an easy customizible NPC, that you can change yourself. Say you want to change the item traded from maple leaves to Golden Maple Leaves. Just change the variable at the top, and at the bottom, and on the selections. You can easily edit the items that are given to the character by changing the itemID and name. Enjoy!
PHP:
/**
OdinMS Javascript
NPC: Spiegelmann
**/
var status;
var leafs;
var itemID;
var itemName;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
status++;
if(mode != 1){
cm.dispose();
return;
}
if(status == 0){
cm.sendNext("Hello, you got any Maple Leaves?");
} else if (status == 1) {
cm.sendSimple("You can obtain Maple Leaves from killing any monster. Anyways, you can trade your Maple Leaves here for items. By the way, the Maple Leaves look like this: #v4001126. \r\n\r\n#L0##e#bCrystal Ilbi Forging Manual#l\r\n#L1#Crystal Leaf Earrings Forging Manual#l\r\n#L2#Facestompers Forging Manual#l\r\n#L3#Black Phoenix Shield Forging Manual#l\r\n#L4#Neva Forging Manual#l\r\n#L5#Stormcasters Forging Manual#l\r\n#L6#Sirius Cloak Forging Manual#l\r\n#L7#Tiger's Fang Forging Manual#l\r\n#L8#Ilbi#l");
} else if (status == 2) {
if (selection == 0) {
leafs = 250;
itemID = 4031912;
itemName = "Crystal Ilbi Forging Manual";
} else if (selection == 1) {
leafs = 200;
itemID = 4031825;
itemName = "Crystal Leaf Earring Forging Manual";
} else if (selection == 2) {
leafs = 325;
itemID = 4031911;
itemName = "Facestompers Forging Manual";
} else if (selection == 3) {
leafs = 175;
itemID = 4031829;
itemName = "Black Phoenix Shield Forging Manual";
} else if (selection == 4) {
leafs = 200;
itemID = 4031908;
itemName = "Neva Forging Manual";
} else if (selection == 5) {
leafs = 325;
itemID = 4031824;
itemName = "Stormcasters Forging Manual";
} else if (selection == 6) {
leafs = 175;
itemID = 4031827;
itemName = "Sirius Cloak Forging Manual";
} else if (selection == 7) {
leafs = 225;
itemID = 4031907;
itemName = "Tiger's Fang Forging Manual";
} else if (selection == 8) {
leafs = 150;
itemID = 2070006;
itemName = "Ilbi";
}
cm.sendYesNo("Are you sure you want to get the " + itemName + "? It will cost you #b" + leafs + " #kMaple Leaves.");
} else if (mode == 1) {
if (!cm.haveItem(4001126,leafs)){
cm.sendOk("You don't have the required #b" + leafs + " Maple Leaves. #kVote more, and you will get enough eventually.");
cm.dispose();
}else{
cm.gainItem(4001126,-leafs);
cm.gainItem(itemID,1);
cm.sendOk("Enjoy your #b" + itemName + "! #kRemember to vote more often to get more of these exclusive deals!");
cm.dispose();
}
}
}
Last edited: