seems that they changed at PWI now the WQ. They have new NPCs and I can not find the WQ in the Quest list anymore Instead of this is now the WQ item in the quest item listed and there is written whats the next NPC.
NPC 31 .... at 629, 243
NPC 32 .... landing possible at 648, 111
NPC 33 .... landing possible at 670, 175
NPC 34 .... landing possible at 115, 257
NPC 35 .... landing possible at 147, 247
NPC 36 .... landing possible at 172, 261
NPC 37 .... landing possible at 234, 231
From NPC 32 to 34 it is currently not possible to fly via auto pilot as the direct line go over the corner with no land.
lvl 70+ get 226 000 exp
lvl 90+ get 678 000 exp. the random reward like 5 rep, 10 k coins, 1 mirage seems to be the same
Here are my offsets. Can't get the bot to work. The "reset after flying up" doesn't work anymore. No clue why, maybe one of the offsets is wrong or they changed the fly function. Someone knows?
Interest07 wrote already the coordinates to his database that he uploaded (thank you very much)
There is written:
26161 world 2484.93 217.74 -4391.85
But these coordinates are completly different to others at the source code. Example:
PWDAtabase ID: 6639
World: 431 737 (22) Merchant Chen
from interest07 download file:
6639 world 310.56 221.01 1869.16
in the source:
xCoord8359 := 1134178481
yCoord8359 := 1130168939
zCoord8359 := 1156163994
The source code use unsigned integer values as floating point coordinates (the ones from Interest07's database). All your have to do is getting the hexadecimal conversion of the floating point value in the database, ans then convert the hex value to decimal and your have the value to put in the source code.
If you ask yourself why the floating point values from Interest07's DB is not the X Y (alt) you can get in game, I fear I have no clue right now. But anyway what I told you above should be sufficient to upgrade the source with new npcs .
edit : useful link for hex2float float2hex conversion :
Hi, thank you for your fast response. Yes I read something about floating points the last days here in the forum from Interest07 but searched not enough for it as it seems.
Your answer was very helpful. Thank you very much. I hope I have soon time to try it. Thank you and nice weekend
Edit:
OK, I had now time to test it and I think I got it now xD
Interest07 Database:
12974 world 1332.28 219.61 956.61
(Example for everybody who want to know it too and is as me old man a little bit slow in programming) The 1332.28 you convert here: from float Value to Hex Value and then here from Hex Value to Dec Value.
And this is what Interest07 used at his bot.
The question that I have now is, how did Interest07 got the coordinates like:
1332.28 219.61 956.61
Interest07 wrote here:
Quote:
The id listed here in indeed a 'typeId' of sorts (although every NPC is a seperate 'type'). It is located in memory right next to the unique id (0x8010XXXX) you are referring to.
But I think I do not understand this. How to get these coordinates?
From what I can deduce of the 2 examples of npc coord you gave it seems that :
X value is X coordinate in the game
Y value is the altitude in the game
Z value is the Y coordinate in the game
There is a 10x factor between the DB value and the in game coord and a position offset that seems to be 400, 550 (0) in the game ref.
This point has the coord 0,0,0 in the DB.
So basically if you want to convert a game coord to the DB value used in the programm, you will have to do :
Xdb = (Xgame - 400)*10
Ydb = ALTgame*10
Zdb = (Ygame - 550)*10
This formula works with the 2 coords' npcs you gave previously and it should work with all coordinates.
I hope this will help you.
In another hand I saw the flyup function doesn't work anymore (seemed buggy anyway). I will try to fix.
Do not hesitate to post here your advancements .
edit : I made the formula from observations of the values but I suppose Interest07 just picked the values from the memory.
I tried now the first time since the update the "old" WQ Bot 2.9 (thank you very much) with the new offsets from MSXGames (thank you very much).
As you wrote correct, there is since the last expansion a problem that the bot fly up at the begin. With this problem the bot worked at the one char till NPC 20 or 22. Then he stucked the first time.
But I try now to get the new coordinates for the 7 added NPCs to the WQ and write them here. Next week I try to add them into the source code of WQ Bot.
NPC 31 .... at 628, 242 (25)
PWDatabase 24963 Laid-back Old Man
24963 world 2280 250 -3080
Hex: 0x450e8000 - 0x437a0000 - 0xc5408000
That are the following coordinates for the Bot:
Dec: 1158578176 - 1132068864 - 3309338624
NPC 32 .... landing possible at 648, 111 (21) Emerald Moon PWDB ID: 26161
2480 210 -3890
0x451b0000 - 0x45034000 - 0xc5732000
1159397376 - 1157840896 - 3312656384
NPC 33 .... landing possible at 670, 175 (24) Guard Autumnland 24982
2700 240 -3750
0x4528c000 - 0x43700000 - 0xc56a6000
1160298496 - 1131413504 - 3312082944
NPC 34 .... landing possible at 115, 257 (20) Valiant Avatar 29056
-2850 200 -2930
0xc5322000 - 0x43480000 - 0xc5372000
3308396544 - 1128792064 - 3308724224
NPC 35 .... landing possible at 147, 247 (13) Merchant Fritz ID: 29101
-2530 130 -3030
0xc51e2000 - 0x43020000 - 0xc53d6000
3307085824 - 1124204544 - 3309133824
NPC 36 .... landing possible at 172, 261 (21) Feong Yong 29011
-2280 210 -2890
0xc50e8000 - 0x43520000 - 0xc534a000
3306061824 - 1129447424 - 3308560384
NPC 37 .... landing possible at 234, 231 (22) Ancestral Guardian Shawn 30033
-1660 220 -3190
0xc4cf8000 - 0x435c0000 - 0xc5476000
3301933056 - 1130102784 - 3309789184
OK, that are all coordinates
But to change the source code that the bot works well, I think I am to much noob. There is the problem that he do not fly up and then must be added another "else if" into the bot. An Elseif that if the WQ go from point 32 to 34 that he fly over an other point (example) 481, 207 (22 if bot must land) (no mobs and NPC can attack there) on the map as there is no direct fly between these two points possible.
Edit / Update:
Hello
I changed now the source code. At first: I did not tried it until now I have problems to compile it lol. he write an mistake in line 41 but there I did not changed anything. Question: which compiler is the best for ahk source code? VS 2008 and AutoIT Debugger seems that they not work
I added the 7 new NPC coordinates and I added 7 additional loops. (thats all that I made)
There are known Bugs:
Since the last expansion do not work the fly up. (not sure if it is as of a wrong offset or if the old code do not work at the expansion). Here is the source code from the fly up:
Code:
flyUp(client, times)
{
global
local loopn := times - 1
local time := 0.5
local baseAddress := ReadMemory(realBaseAddress,client)
local pointer1 := ReadMemory(baseAddress+baseOffset,client)
local player := ReadMemory(pointer1+playerOffset,client)
SetFormat, IntegerFast, hex
local yCoord := readmemory(player+playerYposOffset, client, 4)
local yCoordFloat := hextofloat(yCoord)
if(yCoordFloat < 700)
{
loop %times%
{
sleep 500
local packet := "0700"
local counter := readmemory(player+playerCounterOffset, client, 2)
local interval := readmemory(player+playerIntervalOffset, client, 2)
local xCoord := readmemory(player+playerXposOffset, client, 4)
local zCoord := readmemory(player+playerZposOffset, client, 4)
local speed := readmemory(player+playerFlySpdOffset, client, 4)
local moveType := 0x61
local speedFloat := hextofloat(speed)
local yCoordFloat := yCoordFloat + speedFloat * time
local sendSpeedFloat := speedFloat * 256 + 0.5
local sendSpeedHex := floor(sendSpeedFloat)
local sendYcoordHex := floattohex(yCoordFloat)
revHex(value, xCoord)
packet := packet . value
revHex(value, sendYcoordHex)
packet := packet . value
revHex(value, zCoord)
packet := packet . value
revHex(value, sendSpeedHex, 4)
packet := packet . value
packet := packet . "00"
revHex(value, moveType, 2)
packet := packet . value
revHex(value, counter, 4)
packet := packet . value
packet := packet . "F401"
writeMemory(counter + 1,player+playerCounterOffset, client, 2)
writeMemory(sendYcoordHex,player+playerYposOffset, client)
sendPacket(packet, "16", 0x16, client)
}
local packet := "0700"
local counter := readmemory(player+playerCounterOffset, client, 2)
local speedFloat := hextofloat(speed)
local yCoordFloat := yCoordFloat + speedFloat * time
local sendSpeedFloat := speedFloat * 256 + 0.5
local sendSpeedHex := floor(sendSpeedFloat)
local sendYcoordHex := floattohex(yCoordFloat)
revHex(value, xCoord)
packet := packet . value
revHex(value, sendYcoordHex)
packet := packet . value
revHex(value, zCoord)
packet := packet . value
revHex(value, sendSpeedHex, 4)
packet := packet . value
packet := packet . "00"
revHex(value, moveType, 2)
packet := packet . value
revHex(value, counter, 4)
packet := packet . value
packet := packet . "0000"
writeMemory(counter + 1,player+playerCounterOffset, client, 2)
writeMemory(sendYcoordHex,player+playerYposOffset, client)
sendPacket(packet, "16", 0x16, client)
sleep 2000
}
SetFormat, IntegerFast, d
}
The second known Bug is, that if you must fly from NPC 32 to NPC 34 the bot stops at 40% as there is no map (the corner between tideborn and earthguard) Until now I do not have any Idea how to slove this problem. (I know that I can give the program an additional point to fly to this. But I do not know how to make it.
So again. This Bot have Beta status. I never tried it until now. And as fly up do not work maybe you get stuck arround NPC 21 or so and maybe later too. Or maybe the bot do not work.
i tried to fix the flyup function but I can't find what has changed with the last expansion... I fear it is related to the way the server update the player position. From what I understood from the code we send some positions for a laps of time to the server depending our flight speed and then we send a invalid packet that is supposed the update the client with the last known position. But in fact this last position is our original position before we used the function to fly up. So either the offset to send position packets is not the good one, or the invalid packet doesn't work anymore to update the client (I saw that any action you do after using the flyup function is unable to be performed).
Anyways, since the function is broken and because I'm not confident with packet send, I created a new flyup function that use some call to the flyTo function in order to fly up in an ascendant spire around the ground position. This works like a charm and could even fix some fly up problems when a tree is above the npc.
I have to do some tests to be sure it works with all npcs and I will add the new npcs in the same time. For the one that can't be reached directly cause of the bounds of the map, I will add an extra way point to avoid the bounds.
edit : ****... I just realized that the 7 new npcs don't appear in the quest list at all...what is a big deal since the loop that allow to fly to the next npc check the npc id from the quests and compare it to the list in the programm... this will need to get it from else where.
****... I just realized that the 7 new npcs don't appear in the quest list at all...what is a big deal since the loop that allow to fly to the next npc check the npc id from the quests and compare it to the list in the programm... this will need to get it from else where.
Quest item inventory, there is an item there related to WQ quest, that updates for every completed step. Id of that item uniquely corresponds to a specific quest id and can thus be used for a lookup in a custom maintained quest list. It works for all quests in WQ chain.
It would be the best way to make it work but I have neither the offset for the quest item inventory nor the ids of the objects to get in.
I'll make a brainless code that fly to each npcs and check if the quest is available or not the time to find how to make the quest item inventory work.
I'll make a brainless code that fly to each npcs and check if the quest is available or not the time to find how to make the quest item inventory work.
That will be very good, Thank you very much. I think that this is good.
Then it is not needed to set an point between station 32 and 34. As direct fly from 33 to 34 work
Quests ids are not good... it is not 8399 and so on but a probably higher value. Without it I can't validate the quest at each npc. If anyone that have knoweldge in Cheat Engine could get the id from the sendpacket adress when giving back the quest at npc31 or get it by any other way, I would be able to finish my fix.
It would be the best way to make it work but I have neither the offset for the quest item inventory nor the ids of the objects to get in.
Offsets for quest item inventory:
base + [$1C + [$34 + [$D8C + [$0C + [(inventoryIndex*4) + [<itemStruct>]]]]]]
where:
- base is what WQ.ahk refers to as realBase
- inventoryIndex is numerical value ranging from 0 to 31 (number of quest inventory slots, you'll want to scan inventory at start to locate WQ item slot index)
- itemStruct is a structure of items contained in quest inventory, with itemId located at offset $08
From the early days, I have this list that is however not modified to account for the latest patch, so you can do some work as well
itemId is in decimal notation, questId is in hexadecimal notation
Npc names in list are not the ones used on current PWI version, these are from way back from PW-MYEN days, but you should be able to link these with questIds in npcIds from WQ.ahk.
I got id = 37013 for vol.31 what is exactly the id of this item in pwdatabase.
Just need the quest ids to take the quest to the npc and all will be fixed soon
Edit : ROFL pwdatabase is just amazing : it store the id of the quests too in the adress bar. Just have to pick up the ids ^^. I'll post the final code soon : be ready !
Edit 2 : Still filling the exact coords for new npcs and trying to deal with covered npcs... not an easy task in fact.