Anything like a Parser

Whatever you want here. Just make sure it's off topic. Which...I guess if the topic is being off topic, then it means you should be on topic. Understand?
Post Reply
Message
Author
holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Anything like a Parser

#1 Post by holycow1 » Fri Nov 28, 2008 1:34 pm

hey Im playing Shaiya and was wondering if anyone has made like a dmg parser or exp/hr counter. We had these on FFXI and I would just like to see how fast im lvling or who's doing the most dmg in the party.

Thanks a bunch for all your help

Awesome thread btw

holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Re: Anything like a Parser

#2 Post by holycow1 » Wed Dec 03, 2008 12:50 am

so no ones heard anything about a program like this? exp/hr or damage calculator ?

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Anything like a Parser

#3 Post by Administrator » Wed Dec 03, 2008 3:57 am

Nope, but it shouldn't be too hard to make one. Just keep track of how much experience you've gained and for how long, and do the math:

Code: Select all

local expGained = 0;
local startTime = os.time();
local lastAnnounceTime = 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

holycow1
Posts: 9
Joined: Thu Oct 09, 2008 3:48 pm

Re: Anything like a Parser

#4 Post by holycow1 » Tue Dec 09, 2008 11:50 am

k cool ty elverion
im a newb to .lua

User avatar
Rishijin
Posts: 49
Joined: Sat Jul 04, 2009 4:25 pm
Location: Kauai

Re: Anything like a Parser

#5 Post by Rishijin » Sun Jul 12, 2009 4:13 pm

The exp per hour I can understand.

But what about making a DPS one?

Could you read the memory for the combat log strings? (That sort of thing never seems to work for me.)
Or perhaps you'd have to find the address where the calculation occurs?

The script itself would be easy, but how do you get the data?

Please don't say .dll injection :cry:

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Anything like a Parser

#6 Post by Administrator » Sun Jul 12, 2009 4:38 pm

You can do it by reading memory. ZeroSignal used something like this to make sure skills were cast properly. It's up to you to find the pointers to the combat log.

Once you've got a string (which should be something like "You use [SKILL] and hit for X damage."), you can use Lua's string functions, you can pull out the damage. Then, it is as simple as taking your average damage over, say, 10 seconds.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Anything like a Parser

#7 Post by 3cmSailorfuku » Mon Jul 13, 2009 10:07 am

Administrator wrote:You can do it by reading memory. ZeroSignal used something like this to make sure skills were cast properly. It's up to you to find the pointers to the combat log.

Once you've got a string (which should be something like "You use [SKILL] and hit for X damage."), you can use Lua's string functions, you can pull out the damage. Then, it is as simple as taking your average damage over, say, 10 seconds.
Or if you can access the Attackspeed of the weapon, you can calculate it depending on the variable.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest