GREEN GIANT
2013-08-23 06:58:38
Hi Guys,
My current script has a lot of If/Then statements, and Repeat/Until statements and i can't seem to get them to work together in my main loop, individually they work fine but when put together it tends to skip stages out even if they are True.
I'm assuming this is because my Begin/Ends are not properly structured but the If/Then and Repeat/Until statements mess it all up. When you click a Begin it turns Red, when i then click the appropriate End, it does not turn Red (i think this means the two aren't paired)
Can anyone rearrange the following to make it work? Or point me to a thorough guide?
In its current layout it compiles but only does the first Runecheck and Buy and skips the others. There are no Begin/Ends in there because i could not get them to pair.
Thanks.
My current script has a lot of If/Then statements, and Repeat/Until statements and i can't seem to get them to work together in my main loop, individually they work fine but when put together it tends to skip stages out even if they are True.
I'm assuming this is because my Begin/Ends are not properly structured but the If/Then and Repeat/Until statements mess it all up. When you click a Begin it turns Red, when i then click the appropriate End, it does not turn Red (i think this means the two aren't paired)
Can anyone rearrange the following to make it work? Or point me to a thorough guide?
In its current layout it compiles but only does the first Runecheck and Buy and skips the others. There are no Begin/Ends in there because i could not get them to pair.
Thanks.
Begin
Declareplayers;
Setupsrl;
Repeat
If (Not LoggedIn()) then
LogInPlayer() else
If (LoggedIn()) then
Wait(2000);
If (CashCheck < 10000) then
HaltScript else
Repeat
FindLundail;
Until Runeshopscreen;
if Runeshopscreen then
if (CheckRuneStockC >= 1) and ((CheckRuneStockC * 50) < CashCheck) then
repeat
BuyRuneC
Until CheckRuneStockC <= 1 else
if (CheckRuneStockN >= 1) and ((CheckRuneStockN * 225) < CashCheck) then
repeat
BuyRuneN
Until CheckRuneStockN <= 1 else
if (StrToInt(DeathRuneCount) >= 209) and ((StrToInt(DeathRuneCount) * 200) < CashCheck) then
repeat
BuyRuneD
Until (StrToInt(DeathRuneCount) <= 200) else
Haltscript;
CloseShop;
ChangeWorldRand;
Until False;
end.