SRL Archive - Help

Do while reciving XP?


Mahatna

2012-05-07 14:47:11

Hey guys, just wondering if there is an option to see if im receiving xp, and to keep doing something until i stop receiving xp?

Making a script that needs to Wait, then check if siphoning from a nature essdog, but i need to check if still working with if im still getting xp.

Thanks

tehq

2012-05-07 14:49:33

Very possible.

Use something like:
StartXP := GetXPBarTotal; 
and
 XP := (GetXPBarTotal - StartXP);  

Mahatna

2012-05-07 15:09:10

hmm so declare them as const's but how would i actualy grab the xp/do while xp gain?

thanks

tehq

2012-05-07 15:40:17

Declare them as variables like this

var
XP, StartXP: Integer;

then do something like this:

var
XP, StartXP: Integer;
begin
StartXP := GetXPBarTotal;
repeat
//do stuff here
XP := (GetXPBarTotal - StartXP);
until (XP > 5); //or failsafe
end;

Abu

2012-05-07 18:52:05

If I'm correct, while gaining XP you will be animating no? If so, use Pixelshift

Then do:
while IsMoving do
WhatEverTheHellYouWanto;

Ashaman88

2012-05-07 19:37:02

Kyle has this in his runespan script, check out the mainloop