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:
@@ -217,7 +217,7 @@ function action(mode, type, selection) {
|
||||
complete = false;
|
||||
}
|
||||
|
||||
if(java.lang.Math.random() >= 0.9) //A lucky find! Scroll 60%
|
||||
if(Math.random() >= 0.9) //A lucky find! Scroll 60%
|
||||
item += 1;
|
||||
|
||||
if (!complete || !cm.canHold(item, 1))
|
||||
@@ -251,7 +251,7 @@ function action(mode, type, selection) {
|
||||
var reward;
|
||||
if (rewdSet[selectedItem] instanceof Array) {
|
||||
var length = rewdSet[selectedItem][1] - rewdSet[selectedItem][0];
|
||||
reward = rewdSet[selectedItem][0] + java.lang.Math.round(java.lang.Math.random() * length);
|
||||
reward = rewdSet[selectedItem][0] + Math.round(Math.random() * length);
|
||||
}
|
||||
else reward = rewdSet[selectedItem];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user