SRL Archive - MSI Bugs

High alch (maybe low too) problem


Silent

2011-07-07 14:04:51

I posted this at the end of one of my progress reports in the progress report thread, and Coh3n gave me a different magic.simba to test out. Well it didn't work. The alcher will still sit and try to alch even if you are out of nature runes. I was using a fire staff so I can't say if it affects the fire runes too. Debug below.

[ ************ ] ---------- Casts left[0]: 10
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Scanning for randoms...
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 9
[ ************ ] ---------- Enough Nature runes to cast 9 High Level Alchemys
[ ************ ] ---------- Player can cast 9 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [9]
[ ************ ] ---------- Number of casts[0]: 391
[ ************ ] ---------- Casts left[0]: 9
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 8
[ ************ ] ---------- Enough Nature runes to cast 8 High Level Alchemys
[ ************ ] ---------- Player can cast 8 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [8]
[ ************ ] ---------- Number of casts[0]: 392
[ ************ ] ---------- Casts left[0]: 8
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Player animation: High Alching
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 7
[ ************ ] ---------- Enough Nature runes to cast 7 High Level Alchemys
[ ************ ] ---------- Player can cast 7 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [7]
[ ************ ] ---------- Number of casts[0]: 393
[ ************ ] ---------- Casts left[0]: 7
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Player animation: High Alching
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 6
[ ************ ] ---------- Enough Nature runes to cast 6 High Level Alchemys
[ ************ ] ---------- Player can cast 6 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [6]
[ ************ ] ---------- Number of casts[0]: 394
[ ************ ] ---------- Casts left[0]: 6
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Player animation: High Alching
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 5
[ ************ ] ---------- Enough Nature runes to cast 5 High Level Alchemys
[ ************ ] ---------- Player can cast 5 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [5]
[ ************ ] ---------- Number of casts[0]: 395
[ ************ ] ---------- Casts left[0]: 5
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 5
[ ************ ] ---------- Enough Nature runes to cast 5 High Level Alchemys
[ ************ ] ---------- Player can cast 5 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [5]
[ ************ ] ---------- Number of casts[0]: 395
[ ************ ] ---------- Casts left[0]: 5
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Scanning for randoms...
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 4
[ ************ ] ---------- Enough Nature runes to cast 4 High Level Alchemys
[ ************ ] ---------- Player can cast 4 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [4]
[ ************ ] ---------- Number of casts[0]: 396
[ ************ ] ---------- Casts left[0]: 4
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 3
[ ************ ] ---------- Enough Nature runes to cast 3 High Level Alchemys
[ ************ ] ---------- Player can cast 3 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [3]
[ ************ ] ---------- Number of casts[0]: 397
[ ************ ] ---------- Casts left[0]: 3
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 2
[ ************ ] ---------- Enough Nature runes to cast 2 High Level Alchemys
[ ************ ] ---------- Player can cast 2 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [2]
[ ************ ] ---------- Number of casts[0]: 398
[ ************ ] ---------- Casts left[0]: 2
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Player animation: High Alching
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ------------ Nature Rune found: 1
[ ************ ] ---------- Enough Nature runes to cast 1 High Level Alchemys
[ ************ ] ---------- Player can cast 1 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] -------- MSI_CalculateCasts: [1]
[ ************ ] ---------- Number of casts[0]: 399
[ ************ ] ---------- Casts left[0]: 1
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- Player animation: High Alching
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] ---------- Enough Nature runes to cast 0 High Level Alchemys
[ ************ ] ---------- Player can cast 0 High Level Alchemys
[ ************ ] ---------- Nature runes left: 0
[ ************ ] ---------- Removing High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts: [0]
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- MSI_AntiBan
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] ---------- Scanning for randoms...
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] ---------- Scanning for randoms...
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] ---------- Scanning for randoms...
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] ------ MSI_CastInvSlot: False
[ ************ ] -------- Scanning for randoms...
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] -------- MSI_AntiBan
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] ---------- Scanning for randoms...
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot
[ ************ ] ---------- Clicked spell: High Level Alchemy
[ ************ ] -------- MSI_CalculateCasts
[ ************ ] ------------ Staff types already set in DeclarePlayers
[ ************ ] ------------ Fire rune not needed, we have a staff
[ ************ ] -------- MSI_CalculateCasts: []
[ ************ ] -------- Cast High Level Alchemy on slot 16
[ ************ ] ------ MSI_CastInvSlot: True
[ ************ ] ------ MSI_CastInvSlot

It goes on, but I didn't think all of it would be necessary as it's the exact same thing. Just thought people should be aware.

NCDS

2011-07-07 21:39:11

Not sure exactly what Coh3n changed in the file he gave you, but I'll add a check for the necessary runes if it's not already there. If it is there, I'm going to have to figure out something else as to why that's happening.

Regardless, we'll take care of it. :) Thanks for the feedback!

Silent

2011-07-07 21:52:30

Well for what it's worth, here is the one he gave me.

Coh3n

2011-07-08 01:04:31

This is everything I changed. Silent, the debug in the first post, is that from the updated version I gave you?

MSI/Skills/Magic.simba | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/MSI/Skills/Magic.simba b/MSI/Skills/Magic.simba
index 3230a31..8ef0355 100644
--- a/MSI/Skills/Magic.simba
+++ b/MSI/Skills/Magic.simba
@@ -590,6 +590,13 @@ begin
MSI_Debug(MSI_Items[Runes[j]+MSI_RUNE_AIR].Name+'s left: '+IntToStr(rAmounts[Runes[j]]));
end;
end;
+
+ for i := 0 to high(result) do
+ if (result[i] <= 0) then
+ begin
+ MSI_Debug('Removing '+capitalize(MSI_Spells[spells[i]].name));
+ deleteValueInIntArray(spells, i);
+ end;
end;

MSI_CloseHeader('MSI_CalculateCasts: ' + ToStr(Result));
@@ -858,6 +865,14 @@ begin

with MSI_Players[CurrentPlayer].Scripts[CurrentScript] do
begin
+ if (length(spells) <= 0) then
+ begin
+ result := false;
+ MSI_CloseHeader('MSI_Alch: '+boolToStr(result));
+ MSI_Players[currentPlayer].reportInfo.falseReason := 'Ran out of runes';
+ exit;
+ end;
+
anim := MSI_GetAnimation(MSI_Spells[Spell].AnimConst);

if (Length(AlchSlots) <= 0) then


E: Fixed and committed. :)

Silent

2011-07-08 04:04:00

From: Coh3n
This is everything I changed. Silent, the debug in the first post, is that from the updated version I gave you?

E: Fixed and committed. :)


Yes it was, but it sounds like you fixed it now! :) I'll test again tomorrow to be sure and edit this later.

Coh3n

2011-07-08 06:11:49

From: Silent SPY
Yes it was, but it sounds like you fixed it now! :) I'll test again tomorrow to be sure and edit this later.
Yeah it worked fine for me, but yeah test it please, just to be sure. :)