Script references patch

Cleared issue in a few scripts which would be trying to access Java Math library methods with unexpected parameter types.
Fixed EllinPQ rewarder NPC handing out an unexpected itemid to the player.
Cleared SQL foreign key constraint statement no longer supposed to be used.
This commit is contained in:
ronancpl
2019-10-30 23:31:15 -03:00
parent 7d8d4691da
commit d9f87f18a1
31 changed files with 39 additions and 34 deletions

View File

@@ -13,13 +13,14 @@ function action(mode, type, selection) {
return;
}
if (status == 0) {
cm.sendSimple("My name is Pergen, I am the strongest magician around these parts.#b\r\n#L0#Hey, take these rubbles. You can perform your magic on them.#l");
cm.sendSimple("My name is #p2131001#, I am the strongest magician around these parts.#b\r\n#L0#Hey, take these rubbles. You can perform your magic on them.#l");
} else if (status == 1) {
if (!cm.haveItem(exchangeItem, 100)) {
cm.sendNext("You don't have enough... I need at least 100.");
cm.dispose();
} else {
cm.sendGetNumber("Hey, that's a good idea! I can give you #i4310000#Perfect Pitch for each 100 #i" + exchangeItem + "##t" + exchangeItem + "# you give me. How many do you want? (Current Items: " + cm.itemQuantity(exchangeItem) + ")", java.lang.Math.min(300, cm.itemQuantity(exchangeItem) / 100), 1, java.lang.Math.min(300, cm.itemQuantity(exchangeItem) / 100));
// thanks yuxaij for noticing a few methods having parameters not matching the expected Math library function parameter types
cm.sendGetNumber("Hey, that's a good idea! I can give you #i4310000#Perfect Pitch for each 100 #i" + exchangeItem + "##t" + exchangeItem + "# you give me. How many do you want? (Current Items: " + cm.itemQuantity(exchangeItem) + ")", Math.min(300, cm.itemQuantity(exchangeItem) / 100), 1, Math.min(300, cm.itemQuantity(exchangeItem) / 100));
}
} else if (status == 2) {
if (selection >= 1 && selection <= cm.itemQuantity(exchangeItem) / 100) {