Page 1 of 1

Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Sun Oct 04, 2015 12:06 pm
by beanybabe
Here is a daily to use tickets. It will run till you are out of tickets!!. It works till someone posts a better way point.
It does not do class swapping.

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Tue Sep 22, 2020 5:50 am
by ThulsaDoom
Now it is used:

Code: Select all

player:target_Object(123623) -- Wounded Guard
five times to complete the mission
If the guard is sit down, works, but if he is stand up you can't heal him.

Is there any way to know if he is available or sit / stand up?

Many thanks

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Thu Sep 24, 2020 9:12 pm
by Administrator
ThulsaDoom wrote: Tue Sep 22, 2020 5:50 am Now it is used:

Code: Select all

player:target_Object(123623) -- Wounded Guard
five times to complete the mission
If the guard is sit down, works, but if he is stand up you can't heal him.

Is there any way to know if he is available or sit / stand up?

Many thanks
Hmm, you might be able to check the stance or attackable flags. It's just a guess though.

Code: Select all

local stance = memoryReadByte(getProc(), player.TargetPtr + addresses.game_root.pawn.stance);
local attackableFlags = memoryReadInt(getProc(), player.TargetPtr + addresses.game_root.pawn.attackable_flags)

printf("Stance: 0x%X\n", stance);
printf("Attackable Flags: 0x%X\n", attackableFlag );
Try sampling both while he's standing and sitting; are they different? Is it reliable?

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Fri Sep 25, 2020 1:07 pm
by ThulsaDoom
Administrator wrote: Thu Sep 24, 2020 9:12 pm
ThulsaDoom wrote: Tue Sep 22, 2020 5:50 am Now it is used:

Code: Select all

player:target_Object(123623) -- Wounded Guard
five times to complete the mission
If the guard is sit down, works, but if he is stand up you can't heal him.

Is there any way to know if he is available or sit / stand up?

Many thanks
Hmm, you might be able to check the stance or attackable flags. It's just a guess though.

Code: Select all

local stance = memoryReadByte(getProc(), player.TargetPtr + addresses.game_root.pawn.stance);
local attackableFlags = memoryReadInt(getProc(), player.TargetPtr + addresses.game_root.pawn.attackable_flags)

printf("Stance: 0x%X\n", stance);
printf("Attackable Flags: 0x%X\n", attackableFlag );
Try sampling both while he's standing and sitting; are they different? Is it reliable?
I added the code poposed to Rbassist.xml main loop:

Code: Select all

-- Main loop
	while (true) do
		yrest(250)
		
			local stance = memoryReadByte(getProc(), player.TargetPtr + addresses.game_root.pawn.stance);
			local attackableFlags = memoryReadInt(getProc(), player.TargetPtr + addresses.game_root.pawn.attackable_flags)

			printf("Stance: 0x%X\n", stance);
			printf("Attackable Flags: 0x%X\n", attackableFlag );
		..
When the bot tries to wound the "wounded guard", nothing happens. You cannot select the wounded guardian, it is healed only by placing the course on the guard and clicking the mouse.
When I click on the quest giver "Julius Mimet", the following error appears:

Code: Select all

2020-09-25 19:57:07 - [string "..."]:38: bad argument #1 to 'printf' (got nil)
Thanks for your help

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Fri Sep 25, 2020 3:45 pm
by Administrator
Ah. I see. Maybe this?

Code: Select all

local guard = player.findNearestNameOrId("Put the guard's name here");
if guard ~= nil then
    local stance = memoryReadByte(getProc(), guard.Address + addresses.game_root.pawn.stance);
    local attackableFlags = memoryReadInt(getProc(), guard.Address + addresses.game_root.pawn.attackable_flags)
    
    printf("Stance: 0x%X\n", stance or -1);
    printf("Attackable Flags: 0x%X\n", attackableFlags -1);
end

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Sat Sep 26, 2020 6:25 am
by ThulsaDoom
Administrator wrote: Fri Sep 25, 2020 3:45 pm Ah. I see. Maybe this?

Code: Select all

local guard = player.findNearestNameOrId("Put the guard's name here");
if guard ~= nil then
    local stance = memoryReadByte(getProc(), guard.Address + addresses.game_root.pawn.stance);
    local attackableFlags = memoryReadInt(getProc(), guard.Address + addresses.game_root.pawn.attackable_flags)
    
    printf("Stance: 0x%X\n", stance or -1);
    printf("Attackable Flags: 0x%X\n", attackableFlags -1);
end
I tried it, getting error:

Code: Select all

2020-09-26 13:22:37 - D:/Runes of magic/micromacro/scripts/rom/classes/player.lua:3734: attempt to call method 'updateXYZ' (a nil value)

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Sun Sep 27, 2020 12:50 pm
by Administrator
Sorry; my mistake. Instead of

Code: Select all

player.findNearestNameOrId
, it should be

Code: Select all

player:findNearestNameOrId

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Mon Sep 28, 2020 1:06 pm
by ThulsaDoom
Administrator wrote: Sun Sep 27, 2020 12:50 pm Sorry; my mistake. Instead of

Code: Select all

player.findNearestNameOrId
, it should be

Code: Select all

player:findNearestNameOrId
I didn't realize about this mistake! Thanks

Test has been done, with result:

Code: Select all

Stance: 0x0
Attackable Flags: 0x10003C7
There is no difference while standing and sitting, always the same value.

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Fri Oct 02, 2020 9:53 am
by Administrator
That's unfortunate. I was hoping one of those values would have been different. There might be some other value stored in the pawn struct but I have no idea where or what data type it would be. You could try investigating with Cheat Engine; do you have any experience with that?

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Sun Oct 11, 2020 3:44 am
by ThulsaDoom
Administrator wrote: Fri Oct 02, 2020 9:53 am That's unfortunate. I was hoping one of those values would have been different. There might be some other value stored in the pawn struct but I have no idea where or what data type it would be. You could try investigating with Cheat Engine; do you have any experience with that?
I know Cheat Engine, but my knowledge is not so advanced as to find this kind of data.
Anyway, we will continue as before. I don't think it is necessary to spend a lot of time on this matter, there are other priorities.

Thanks!

Re: Splitwater Coast Daily- Clean Wounds Heal Faster/w resets

Posted: Sun Oct 18, 2020 2:25 am
by ThulsaDoom
Some news after last addresses update. "attackable_flags" is changing the status with the Wounded Guard.

Values with the guard sitting and waiting to be activated:

Code: Select all

Stance: 0x0
Attackable Flags: 0x10003C7
After being activated and standing:

Code: Select all

Stance: 0x0
Attackable Flags: 0x1000387
The funny thing is that the status changes when we activate the guard and he stands up, then the value changes again but the guard remains standing for about six seconds, then he sits down again and it is when it can be activated again.
During the six seconds that the value of the flag has already changed but the guard is not seated, he cannot be activated.
It seems that the action of standing or sitting is linked to the action of activating the guard.