SRL Archive - Help

Why would findnormalrandom() keep changing gametab to inventory


freezeyp

2012-10-12 23:36:09

Recently I start to make a super heating script and counter this problem, and finding that when i try to cast spell, findnormalrandom() will change gametab to inventory and screw up my process.

Ian

2012-10-12 23:37:52

Try only calling findnormalrandoms when you are already in your inventory

riwu

2012-10-12 23:46:03

To check for the random gift box. Call FindNonInventoryRandoms instead to make it skip checking that.

Le Jingle

2012-10-12 23:50:46

You might want to try,

_FindAllrandoms(false);
or

FindNonInventoryRandoms;

That way you will not check your inventory every time for inventory randoms.

P1ng

2012-10-12 23:52:00

What riwu said above is true, I created this function for me to use instead, basically just checks if you are already in the inventory it does FindNormalRandoms if you aren't then it just checks for non-inventory randoms.. Feel free to use it if you like, it doesn't make life that much easier, I just cbf'ed to write two different randoms searches.

function PRandoms: Boolean;
begin
if GetCurrentTab = Tab_Inv then
Result := FindNormalRandoms else
Result := FindNonInventoryRandoms;
end;

WT-Fakawi

2012-10-13 03:36:35

From: P1ng
What riwu said above is true, I created this function for me to use instead, basically just checks if you are already in the inventory it does FindNormalRandoms if you aren't then it just checks for non-inventory randoms.. Feel free to use it if you like, it doesn't make life that much easier, I just cbf'ed to write two different randoms searches.

function PRandoms: Boolean;
begin
if GetCurrentTab = Tab_Inv then
Result := FindNormalRandoms else
Result := FindNonInventoryRandoms;
end;


Nice! A looong time ago I wanted to include this in SRL, but someone stopped me, saying: "if people really want this, they will come up with it themselves :)"