Concurrency fix + new scripts
Fixed some situation involving concurrency upon using getCharacters() from MapleMap, added scripts and other bug fixes.
This commit is contained in:
@@ -200,96 +200,4 @@ function action(mode, type, selection) {
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
else if(status == 4 && mode == 1) {
|
||||
if (equip) {
|
||||
selectedItem = selection;
|
||||
qty = 1;
|
||||
}
|
||||
else
|
||||
qty = selection;
|
||||
|
||||
var prompt = "To make #t" + item + "#s, I'll need the following materials:";
|
||||
|
||||
if (mats instanceof Array){
|
||||
for(var i = 0; i < mats.length; i++){
|
||||
prompt += "\r\n#i"+mats[i]+"# " + matQty[i] * qty + " #t" + mats[i] + "#";
|
||||
}
|
||||
}
|
||||
else {
|
||||
prompt += "\r\n#i"+mats+"# " + matQty * qty + " #t" + mats + "#";
|
||||
}
|
||||
|
||||
if (cost > 0)
|
||||
prompt += "\r\n#i4031138# " + cost * qty + " meso";
|
||||
|
||||
}
|
||||
|
||||
else if (status == 5 && mode == 1) {
|
||||
var complete = false;
|
||||
|
||||
if (cm.getMeso() < cost * qty) {
|
||||
cm.sendOk("I'm afraid you cannot afford my services.")
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (mats instanceof Array) {
|
||||
for (var i = 0; i < mats.length; i++) {
|
||||
complete = cm.haveItem(mats[i], matQty[i] * qty);
|
||||
if (!complete) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
complete = cm.haveItem(mats, matQty * qty);
|
||||
}
|
||||
}
|
||||
|
||||
if (!complete)
|
||||
cm.sendNext("Please check and see if you have all the necessary items with you. If so, then please check your etc. inventory and see if you have an empty space.");
|
||||
else {
|
||||
if (mats instanceof Array) {
|
||||
for (var i = 0; i < mats.length; i++){
|
||||
cm.gainItem(mats[i], -matQty[i] * qty);
|
||||
}
|
||||
}
|
||||
else
|
||||
cm.gainItem(mats, -matQty * qty);
|
||||
|
||||
cm.gainMeso(-cost * qty);
|
||||
cm.gainItem(item,qty);
|
||||
cm.sendOk("There, finished. What do you think, a piece of art, isn't it? Well, if you need anything else, you know where to find me.");
|
||||
}
|
||||
|
||||
cm.dispose();
|
||||
}*/
|
||||
}
|
||||
Reference in New Issue
Block a user