PWI Eclipse changes

03/29/2015 15:19 Underavelvetmoon#91
Quote:
Originally Posted by jasty View Post
Seems perfect for this! I will also be able to coordinate the autopotter with my bot to share the genie more efficiently between tree of protection and cloud erupt.
When I was coding with GWA2 for Guild Wars we would always put a function within the Kill code to check our health and use a skill to heal when needed. I imagine It would be much easier to do it that way then to AdLib a function every 10 seconds. AdLib is bad unless your trying to keep track of coords or something to find out if your still moving. In your kill script I imagine it would be something like

Code:
 
If SkillIsRecharged($DeadlyShot) then UseSkill($DeadlyShot, 1)
Just add in there

Code:
If $MyHp < 6000 Then 
    HealMe($Mana = 0, $Health = 1)
EndIf 
If $MyMana < 1000 Then
    HealMe($Mana = 1, $Health = 0)
EndIf
Something like that should work great. It saves a lot of memory and is pretty universal to any script that needs to heal in it. You also save a lot of memory by not checking the function every 10 seconds. Just set some constants to read memory of hp and mana and it should only do it when it's needed.
04/05/2015 20:06 Stark77#92
Does anyone know how to read the current location of your character (map name)?
04/05/2015 23:54 jasty#93
Quote:
Originally Posted by Stark77 View Post
Does anyone know how to read the current location of your character (map name)?
From what I can tell the instance ID is at
[[0xD2EBE4]+14]+90

I'm not sure if there's a better chain but that D2EBE4 is static.
This is the list of instance IDs I found (from configs.pck/configs/instance.txt)

04/10/2015 23:24 bestvlad#94
jasty, can you help me with getting all nearby items (loot)? According to new offsets, I am trying to reach them in this way:
pointer = [ [ [ [base] + 1C] + 14] + 24]
itemBase = [ [pointer + i*4] + 4]
I am checking all 'i' from 0 to 768 if it equals zero, but no results. Only trash. What am I doing wrong?
04/11/2015 02:15 Stark77#95
Quote:
Originally Posted by bestvlad View Post
jasty, can you help me with getting all nearby items (loot)? According to new offsets, I am trying to reach them in this way:
pointer = [ [ [ [base] + 1C] + 14] + 24]
itemBase = [ [pointer + i*4] + 4]
I am checking all 'i' from 0 to 768 if it equals zero, but no results. Only trash. What am I doing wrong?
try: pointer = [[ [ [ [base] + 1C] + 14] + 24] + 1C]
ItemCounter = [[ [ [ [base] + 1C] + 14] + 24] + 14]
itemBase = [ [pointer + i*4] + 4]

i loop to 1000 using an additional counter (thisCounter) like this
Code:
if !(itemBase = 0) AND (ItemCounter > (thisCounter - 1))
   ~ read infos...
   thisCounter += 1
04/11/2015 07:36 bestvlad#96
Quote:
Originally Posted by Stark77 View Post
try: pointer = [[ [ [ [base] + 1C] + 14] + 24] + 1C]
ItemCounter = [[ [ [ [base] + 1C] + 14] + 24] + 14]
itemBase = [ [pointer + i*4] + 4]

i loop to 1000 using an additional counter (thisCounter) like this
Code:
if !(itemBase = 0) AND (ItemCounter > (thisCounter - 1))
   ~ read infos...
   thisCounter += 1
Thanks for reply. And what is initial value of thisCounter? I am initializing it with 0 but no results, even no trash.
04/11/2015 15:18 Stark77#97
have you added those the offsets in red text to to chain?
it might be good to just try to print (msgbox) the itemcounter after u droped a few items.
thisCounter is initialed with 1 in my code.
04/11/2015 20:20 bestvlad#98
Yes, I have added offsets. Thanks for reply, bacause I have initialized ItemCounter with 0. Now it works!

Is there any way to detect if player is moving? For example, I found item, sent packet to pick it and need to wait until pickup.
04/11/2015 23:50 Stark77#99
one solution is already posted in this thread here:
see post 35 and 36: [Only registered and activated users can see links. Click Here To Register...]
04/12/2015 00:25 bestvlad#100
Stark, I am thankful to you for replies. While you were offline, I have read this thread and figured out that people found some new ways to move character. I am trying to write my resource harvest bot based on PWFramework (C#). I have rewritten following [Only registered and activated users can see links. Click Here To Register...] function code posted by Remmm:


Here are my offsets (PWI version 844):
It works, but what coords should I pass? In-game coords or floating?
04/12/2015 01:34 Stark77#101
i designed my movement like this:

Code:
MoveTo(X,Y,Z=0,flyflag=0)
{
	if (X < 1000)
	{
		X := floattohex((X*10)-4000) 
		Y := floattohex((Y*10)-5500) 
		Z := floattohex(Z*10)
	}
		
	revHex(revX, X)
	revHex(revY, Y)
	revHex(revZ, Z)
	revHex(revBaseAddress, realbaseAddress) ;~0xD2E444
	revHex(revADDRESS_ACTION1, ADDRESS_ACTION1) ;~0x4A1AA0
	revHex(revADDRESS_ACTION2, ADDRESS_ACTION2) ;~0x4A7DE0
	revHex(revADDRESS_ACTION3, ADDRESS_ACTION3) ;~0x4A2090
	revHex(OFFSET_ACTIONBASE, playerActionStructOffset) ;~0x13F0
	revHex(FLYMODE, flyflag)

	func =					
	func = %func%60
	func = %func%B8%revBaseAddress%
	func = %func%8B00
	func = %func%8B401C
	func = %func%8B7028
	func = %func%8B8E%OFFSET_ACTIONBASE%
	func = %func%6A01
	func = %func%BA%revADDRESS_ACTION1%
	func = %func%FFD2
	func = %func%8BF8
	func = %func%8D442418
	func = %func%50
	func = %func%BA%FLYMODE%
	func = %func%52
	func = %func%8BCF
	func = %func%BA%revADDRESS_ACTION2%
	func = %func%FFD2
	func = %func%8B8E%OFFSET_ACTIONBASE%
	func = %func%B8%revX%
	func = %func%8BD7
	func = %func%83C220
	func = %func%8902
	func = %func%B8%revZ%
	func = %func%8BD7
	func = %func%83C224
	func = %func%8902
	func = %func%B8%revY%
	func = %func%8BD7
	func = %func%83C228
	func = %func%8902
	func = %func%6A00
	func = %func%6A01
	func = %func%57
	func = %func%6A01
	func = %func%BA%revADDRESS_ACTION3%
	func = %func%FFD2
	func = %func%61
	func = %func%C3

	injectCode(func)
}
help functions:

so if u pass the ingame coordinates it will recalculate them. using the reversed hexa form is ofc necessary. dont know if that helps.

short example:
ingameX := 500.0
X := floattohex((ingameX*10)-4000) ; = 0x447A0000
revHex(revX, X) ; = 0x00007a44 -> pass this to injected code
04/12/2015 17:27 jasty#102
Anyone have code that can quickly switch between characters and accounts?
Something more accurate than blindly sending keypresses and hoping for the best. What is everyone doing for this?
04/12/2015 19:55 Stark77#103
Do you mean how others play on mutliple clients and select the one they want? Or do u mean how we log accounts?
04/12/2015 20:08 bestvlad#104
Stark77, thanks for coords transform function btw. I was using simple true floating coords obtained from player struct but when I excecute my function, character begins to move to the south permanently (Y --> 0). I don't know, what is wrong. I have checked all bytes and numbers. Everything is right when the bytecode executes. Did you have such kind of problem?
04/12/2015 20:34 jasty#105
Quote:
Originally Posted by Stark77 View Post
Do you mean how others play on mutliple clients and select the one they want? Or do u mean how we log accounts?
Logging out and logging in, choosing characters from the character select screen. You could do it kinda with mouse/keyboard presses but I don't know how to verify when controls have focus or how long you have to wait. I was wondering what people are doing if it is more reliable.

Controlling multiple clients is just managing multiple pid and doesn't require specific game knowledge.