Hello everyone, this is my first NPC I've started from scratch. So please give me some comments! Note: This need donation points to be implemented. If your server does not have it, see this tutorial at HERE
Insert this into your monsterdrop database. ( add your own monster if you want )
After that, download this file.
Here is the code if you don't want to download the file.
Here is some SS
Insert this into your monsterdrop database. ( add your own monster if you want )
Code:
INSERT INTO `monsterdrops`
(`monsterid`, `itemid`, `chance`)
VALUES
(100100, 4031682, 5);
INSERT INTO `monsterdrops`
(`monsterid`, `itemid`, `chance`)
VALUES
(2110200, 4031682, 5);
INSERT INTO `monsterdrops`
(`monsterid`, `itemid`, `chance`)
VALUES
(3110100, 4031682, 5);
INSERT INTO `monsterdrops`
(`monsterid`, `itemid`, `chance`)
VALUES
(3210100, 4031682, 5);
INSERT INTO `monsterdrops`
(`monsterid`, `itemid`, `chance`)
VALUES
(4230101, 4031682, 5);
After that, download this file.
You must be registered to see links
. Copy and paste it in your scripts/npc and it's ready to work!Here is the code if you don't want to download the file.
Code:
/* FachaiMS - Holiday Event
Wisp - 2040030
*/
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 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Hello #h #! Do you have some coins to exchange? In return I can give you some donation points! What would you like to do? \r\n#L1##bTrade 50 #v4031682##k for 1 #v4001129##k#l \r\n \r\n#L2##bTrade 100 #v4031682##k for 2 #v4001129##k#l \r\n \r\n#L3##b Trade 150 #v4031682##k for 3 #v4001129##k#l \r\n \r\n#L4##b Trade 50 #v4001129##k for 100 donator points!");
} else if (status == 1) {
if (selection == 1) {
if (cm.itemQuantity(4031682) <= 49) {
cm.sendOk(" I Think you have enough #v4031682# hunted, try spending some time hunting the monsters before talking to me.");
cm.dispose();
} else if (cm.itemQuantity(4031682) >= 50) {
cm.gainItem(4031682, -50);
cm.gainItem(4001129, 1);
cm.dispose();
} else {
cm.sendOk("You don't have enough #bCoins#k, are you trying to #eScam#k me!?");
cm.dispose();
}
}
else if (selection == 2) {
if (cm.itemQuantity(4031682) <= 99) {
cm.sendOk(" I Think you have enough #v4031682# hunted, try spending some time hunting the monsters before talking to me.");
cm.dispose();
} else if (cm.itemQuantity(4031682) >= 100) {
cm.gainItem(4031682, -100);
cm.gainItem(4001129, 2);
cm.dispose();
} else {
cm.sendOk("You don't have enough #bCoins#k, are you trying to #eScam#k me!?");
cm.dispose();
}
}
else if (selection == 3) {
if (cm.itemQuantity(4031682) <= 149) {
cm.sendOk(" I Think you have enough #v4031682# hunted, try spending some time hunting the monsters before talking to me.");
cm.dispose();
} else if (cm.itemQuantity(4031682) >= 150) {
cm.gainItem(4031682, -150);
cm.gainItem(4001129, 3);
cm.dispose();
} else {
cm.sendOk("You don't have enough #bCoins#k, are you trying to #eScam#k me!?");
cm.dispose();
}
}
else if (selection == 4) {
if (cm.itemQuantity(4001129) >= 49) {
cm.sendOk(" I Think you have enough #v4001129# exchanged try again when you have it.");
cm.dispose();
} else if(cm.itemQuantity(4001129) >= 50) {
cm.gainItem(4001129, -50);
cm.gainDonationPoints(100);
cm.sendOk("You have gained #b100#k donator points! Happy Fachai Mapling!");
cm.dispose();
} else {
cm.sendOk("You don't have enough #bCoins#k, are you trying to #eScam#k me!?");
cm.dispose();
}
}
}
}
}
Here is some SS
![bizkits - FachaiMS! event - RaGEZONE Forums bizkits - FachaiMS! event - RaGEZONE Forums](http://www.fachaims.com/wisp.jpg)
Last edited: