I have line numbers in my VS turned on, so you can give me a line number area and tell me before such and such or whatever. Id LOVE to have this ability, but dont wanna mess around with the script blindly.
Thanks!
<EDIT>
i TRIED PLACING THE CODE INTO THE BOT.LUA SCRIPT AND GOT AN ERROR FOR THE LAST LINE OF CODE.
'>' expected near 'expPerMin'
It could also be a ')', cant really tell.
The code I used is:
Code: Select all
local expGained = 0;
local startTime = os.time();
local lastAnnounce = os.time();
local lastTotalExp = 0;
while(true) do
local newTotalExp = memoryReadInt(proc, experienceaddr, experience_offset);
if( newTotalExp > lastTotalExp ) then
expGained = expGained + (newTotalExp - lastTotalExp);
end
-- has 10 seconds elapsed? update the exp/min
if( os.difftime(os.time(), lastAnnounce) > 10 ) then
local timeElapsed = os.difftime(os.time(), startTime);
local expPerMin = 0;
if( timeElapsed == 0 ) then timeElapsed = 1; end; -- prevent division by zero
expPerMin = expGained/(timeElapsed/60.0);
lastAnnounce = os.time();
printf("Exp/min: %0.1f\n" expPerMin);
end
end