NPCs Taxis and Crafters now checks properly
Fixed taxis that wouldn't check for mesos upon travel. Fixed crafters that wouldn't check for inventory slots available before crafting items.
This commit is contained in:
@@ -165,7 +165,7 @@ function action(mode, type, selection) {
|
||||
else if (status == 3 && mode == 1) {
|
||||
var complete = true;
|
||||
|
||||
if(!cm.canHold(item)) {
|
||||
if(!cm.canHold(item, 1)) {
|
||||
cm.sendOk("Check your inventory for a free slot first.");
|
||||
cm.dispose();
|
||||
return;
|
||||
@@ -184,24 +184,6 @@ function action(mode, type, selection) {
|
||||
}
|
||||
else if (!cm.haveItem(mats, matQty))
|
||||
complete = false;
|
||||
|
||||
/*
|
||||
if (mats instanceof Array) {
|
||||
for(var i = 0; complete && i < mats.length; i++) {
|
||||
if (matQty[i] == 1) {
|
||||
if (!cm.haveItem(mats[i]))
|
||||
complete = false;
|
||||
}
|
||||
else {
|
||||
if (!cm.haveItem(mats[i],matQty[i] * selection)) complete=false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!cm.haveItem(mats,matQty * selection)) complete=false;
|
||||
|
||||
}*/
|
||||
}
|
||||
if (!complete)
|
||||
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
|
||||
|
||||
Reference in New Issue
Block a user