Hi guys, i have the next problem.
Im trying to make a cube npc, there's no error on the console, but still not working.
The problem is, that when i choose the item i want to cube the chat window closes immediately.
Thats the last line that the npc reads.
Thanks in adv.
Im trying to make a cube npc, there's no error on the console, but still not working.
Code:
var status = -1;
var equip;
var selected;
var state;
function start() {
cm.sendNext("Hello! I can cube your items, please go ahead.");
}
function action(mode, type, selection) {
if (mode < 1)
cm.dispose();
else {
if (mode == 1 && status != 3)
status++;
if (status == 0)
cm.sendSimple("Wich item would you like to cube?\r\n" + cm.EquipList(cm.getC()));
else if (status == 1) {
selected = selection;
state = equip.getState();
equip = cm.getEquip(selection);
cm.sendOk("What would you like to edit on your #b#t"+equip+"#? #k:)");
} else if (status == 2){
cm.sendOk("Hello!");
}
}
cm.dispose();
}
The problem is, that when i choose the item i want to cube the chat window closes immediately.
Code:
cm.sendSimple("Wich item would you like to cube?\r\n" + cm.EquipList(cm.getC()));
Thats the last line that the npc reads.
Thanks in adv.