Log in

View Full Version : Do while reciving XP?



Mahatna
05-07-2012, 06:47 PM
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
05-07-2012, 06:49 PM
Very possible.

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

Mahatna
05-07-2012, 07:09 PM
hmm so declare them as const's but how would i actualy grab the xp/do while xp gain?

thanks

tehq
05-07-2012, 07:40 PM
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
05-07-2012, 10:52 PM
If I'm correct, while gaining XP you will be animating no? If so, use Pixelshift (http://villavu.com/forum/showthread.php?t=74090&highlight=Pixelshift)

Then do:
while IsMoving do
WhatEverTheHellYouWanto;

Ashaman88
05-07-2012, 11:37 PM
Kyle has this in his runespan script, check out the mainloop