Newbie Spellweaver
- Joined
- Dec 30, 2008
- Messages
- 10
- Reaction score
- 0
Missing ')' .
FACEPALM.
Yes, I've been a fool.
(cm.haveItem 2000005, 2000))
You do need 2. Feel free to slap me for my stupidity.
FACEPALM.
Yes, I've been a fool.
(cm.haveItem 2000005, 2000))
You do need 2. Feel free to slap me for my stupidity.
Carelessness is what we humans always do =P .
and now i have another prob.the script i have,i can even exchange the wizet invincible hat even with 1 2000005!!!!i am suppose to do i such that i need 2000 '2000005's.i wan the script to be that i i have only 1 '2000005',i cannot exchange and the npc will reply 'you do not have enough 2000005s'.i think it needs this:haha no nid
if(cm.haveItem(200005 >= 2000)){
cm.gainItem(2000005, -2000);
cm.gainItem(WIZET INVINCIBLE HAT ID, 1);
cm.dispose();
}
else cm.sendOk("You do not have enough 2000005s");
cm.dispose();
if(cm.haveItem(200005, 2000))
thanks!haha another prob now..PHP:if(cm.haveItem(200005, 2000))
Anyway, get31372.. I'm still waiting for your explanation Mr pro.:
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status >= 2 && mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Hi #r#h ##k, I'm the #bItems#k Exchanger! ");
} else if (status == 1) {
cm.sendAcceptDecline("Click accept")
} else if (status == 2) {
if (cm.haveItem(2000005)) {
cm.sendNext("Great, you have a 2000005");
}
} else if (status == 3) {
cm.sendSimple("What would you like to exchange?\r\n#L0##bWizet Invincible Hat#k(#r2000 pwr elixirs#k)#l\r\n#L1# elixirs 30000(#r1 pwr elixir#k)#l\r\n#L2#Crystal Ilbi 1 Set(#r1 pwr elixir#k)#l");
} else if(status == 4) {
if (selection == 0) {
cm.sendYesNo("Are you sure you want to exchange #bWizet Invincible Hat#k?");
}
else if (selection == 1) {
cm.sendYesNo("Are you sure you want to exchange #b30000 Power Elixirs#k?");
}
else if (selection == 2) {
cm.sendOk("There you have it!");
cm.gainItem(2070016, 1);
cm.gainItem(2000005, -1);
cm.dispose();
}
} else if(status == 5) {
if(cm.haveItem(2000005, 2000)){
if(cm.haveItem(1002140)){
cm.sendOk("You already have a #bWizet Invincible hat#k !! Why would you need one more?And,thanks for the #rpwr elixirs!");
cm.gainItem(2000005, -10000);
cm.dispose();
}
else cm.sendOk("There you have it!");
cm.gainItem(1002140, 1);
cm.gainItem(2000005, -2000);
cm.dispose();
}
else cm.sendOk("You do not have enough pwr elixirs");
cm.dispose();
} else if(status == 6) {
cm.sendOk("Here's your #b30000 Elixirs#k!");
cm.gainItem(2000004, 30000);
cm.gainItem(2000005, -1);
cm.dispose();
}
}
}
Great Guide but how do you put multiple things in one npc?
@get31720
about ur guide
er i think you have a typo here:
gainNX
Gives/Takes the player nx
How to use: gm.gainNX([amount]); <---is it gm.gainNX or cm.gainNX
Make it negative to make it take away.
var status = 0;
var choice = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status >= 2 && mode == 0) {
cm.sendOk("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Hi #r#h ##k, I'm the #bItems#k Exchanger!");
}
else if (status == 1) {
cm.sendAcceptDecline("Click accept");
}
else if (status == 2) {
if (cm.haveItem(2000005)) {
cm.sendNext("Great, you have a 2000005");
}
else {
cm.sendOk("Get pwr elixirs before talking to me.");
cm.dispose();
}
}
else if (status == 3) {
cm.sendSimple("What would you like to exchange?\r\n#L0##bWizet Invincible Hat#k(#r2000 pwr elixirs#k)#l\r\n#L1# elixirs 30000(#r1 pwr elixir#k)#l\r\n#L2#Crystal Ilbi 1 Set(#r1 pwr elixir#k)#l");
}
else if(status == 4) {
if (selection == 0) {
cm.sendYesNo("Are you sure you want to exchange #bWizet Invincible Hat#k?");
choice = 1;
}
else if (selection == 1) {
cm.sendYesNo("Are you sure you want to exchange #b30000 Power Elixirs#k?");
choice = 2;
}
else if (selection == 2) {
cm.sendOk("There you have it!");
cm.gainItem(2070016, 1);
cm.gainItem(2000005, -1);
cm.dispose();
}
}
else if(status == 5) {
if (choice == 1) {
if(cm.haveItem(2000005, 2000) && cm.haveItem(1002140)) {
cm.sendOk("You already have a #bWizet Invincible hat#k !! Why would you need one more?And,thanks for the #rpwr elixirs!");
cm.gainItem(2000005, -10000);
cm.dispose();
}
else if (cm.haveItem(2000005, 2000)) {
cm.sendOk("There you have it!");
cm.gainItem(1002140, 1);
cm.gainItem(2000005, -2000);
cm.dispose();
}
else {
cm.sendOk("You do not have enough pwr elixirs");
cm.dispose();
}
}
else if (choice == 2) {
cm.sendOk("Here's your #b30000 Elixirs#k!");
cm.gainItem(2000004, 30000);
cm.gainItem(2000005, -1);
cm.dispose();
}
}
}
}
var wui = 0;
function start() {
cm.sendNext ("Hello, if you have just rebirthed and do not got level 0 equipment, press next to get them.");
}
function action(mode, type, selection) {
cm.dispose();
if (selection == 0) {
cm.gainItem(1102041,1);
cm.gainItem(1002357,1);
cm.gainItem(1442018,1);
cm.gainItem(1442039,1);
cm.sendOk ("Ok, let the training begin!");
}
}
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 2 && mode == 0) {
cm.sendOk("Bye");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 2) {
cm.sendNext("#bHello #h#, Welcome to FallenStory. If you have rebirthed and you DO NOT got a level 0 weapon or Level 0 armour, click "Next" to get a Begginers items.#b");
}
else if (status == 3) {
cm.sendNextPrev("#d#eHere you go.#e#d \r\n\r\n#b#eThis is what you will get..#e#b \r\n#i<1040002># #i<1060002># #i<1072005># #i<1302000>#");
cm.gainItem(1040002,1)
cm.gainItem(1060002,1)
cm.gainItem(1072005,1)
cm.gainItem(1302000,1)
cm.dispose();
}
}
}
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 2 && mode == 0) {
cm.sendOk("Bye");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
cm.sendNext("#bHello #h#, Welcome to FallenStory. If you have rebirthed and you DO NOT got a level 0 weapon or Level 0 armour, click "Next" to get a Begginers items.#b");
}
else if (status == 1) {
cm.sendNextPrev("#d#eHere you go.#e#d \r\n\r\n#b#eThis is what you will get..#e#b \r\n#i<1040002># #i<1060002># #i<1072005># #i<1302000>#");
cm.gainItem;(1040002,1)
cm.gainItem;(1060002,1)
cm.gainItem;(1072005,1)
cm.gainItem;(1302000,1)
cm.dispose();
}
}
}
var mysterious;
function start() {
mysterious = -1;
action(1, 0, 0);
}
function action(cake, type, selection) {
if (cake == 1)
mysterious++;
else {
cm.dispose();
return;
}
if (mysterious == 0)
cm.sendNext("Hello, if you have just rebirthed and do not got level 0 equipment, press next to get them.");
else {
var items = new Array(1102041, 1002357, 1442018, 1442039);
for (var i = 0; i < items.length; i++)
cm.gainItem(items[i], 1);
cm.sendOk ("Ok, let the training begin!");
cm.dipose();
}
}
var status;
var choice;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1)
status++;
else if (mode == -1) {
cm.dispose();
return;
} else { // mode == 0 is the only possible thing in our case.
cm.sendOk("Alright, see you next time.");
cm.dispose();
}
if (status == 0) {
cm.sendNext("Hi #r#h ##k, I'm the #bItems#k Exchanger! ");
} else if (status == 1) {
cm.sendAcceptDecline("Click accept")
} else if (status == 2) {
if (cm.haveItem(2000005))
cm.sendNext("Great, you have a 2000005");
else {
cm.sendNext("MrMysterious is awesome <3.\r\n\r\nYou do not have a #v2000005#");
cm.dispose();
}
} else if (status == 3) {
cm.sendSimple("What would you like to exchange?\r\n#L0##bWizet Invincible Hat#k(#r2000 pwr elixirs#k)#l\r\n#L1# elixirs 30000(#r1 pwr elixir#k)#l\r\n#L2#Crystal Ilbi 1 Set(#r1 pwr elixir#k)#l");
} else if(status == 4) {
choice = selection;
if (selection == 0) {
cm.sendYesNo("Are you sure you want to exchange #bWizet Invincible Hat#k?");
} else if (selection == 1) {
cm.sendYesNo("Are you sure you want to exchange #b30000 Power Elixirs#k?");
} else if (selection == 2) {
cm.sendOk("There you have it!");
cm.gainItem(2070016, 1);
cm.gainItem(2000005, -1);
cm.dispose();
}
} else if (status == 5) {
switch (choice) {
case 0:
if (cm.haveItem(2000005, 2000)) {
if (cm.haveItem(1002140))
cm.sendOk("You already have a #bWizet Invincible hat#k !! Why would you need one more? And,thanks for the #rpwr elixirs!");
else {
cm.gainItem(1002140, 1);
cm.sendOk("There you have it!");
}
cm.gainItem(2000005, -10000);
} else
cm.sendOk("You do not have enough pwr elixirs");
cm.dispose();
break;
case 1:
if (cm.haveItem(2000005)) {
cm.gainItem(2000004, 30000);
cm.gainItem(2000005, -1);
cm.sendOk("Here's your #b30000 Elixirs#k!");
} else
cm.sendNext("MrMysterious is awesome <3.\r\n\r\nYou do not have a #v2000005#"); // Yeah I know, we made a check earlier but I like my name to be everything <3 LOL
cm.dispose();
}
}
}
hello i got an question hopw to give the npc a id nummer and a name