Register for your free account! | Forgot your password?

You last visited: Today at 13:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



WQ bot for PWI

Discussion on WQ bot for PWI within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old 11/23/2012, 19:43   #361
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
Here it is : a working version of FlyWQ back from Hell

I have to say (for my defense) that AhK language make me really thick and this is why the code is now uglier than ever xD (was already ugly before I started but now it's even worst).

I had to handle two types of extra points : one two prevent the collision with the inner border of the map (npc32 to 34) and some to reach from the ground the npc when landing pos was to far from him.

Normally if all work as it is supposed to do, the extra point of type 1 is used when you just start the bot and you have to reach npc34 or when you come from npc32.
If the bot can't reach a npc, it should just stop and do nothing instead of toggling flymode on/off like before.
Since the flyup function doesn't work anymore, I had to deal with it by using the flyTo function and this obliged me to do a tiny fly around upward movement. I hope it doesn't seem too artificial from an external view...


Consider this version as a test version for now because I could not have test all combination of npc and because of this, your character could be stuck one day. Do not hesitate to post here if you encounter a bug and tell from which npc you came and to which one you were going and what happened.


The code :
PHP Code:
#Persistent
#SingleInstance
DetectHiddenWindowsOn
SetKeyDelay
,,50

;Offsets Addresses

IniRead
logActivities        WQing.inimain,logActivities

IniRead
realBaseAddress        WQing.inioffsets,realBaseAddress                        
IniRead
baseOffset            WQing.inioffsets,baseOffset                        
IniRead
playerOffSet            WQing.inioffsets,playerOffSet                        
IniRead
playerNameOffset        WQing.inioffsets,playerNameOffset                    
IniRead
nameLengthOffset        WQing.inioffsets,nameLengthOffset                    
IniRead
playerTargetIdOffset        WQing.inioffsets,playerTargetIdOffset                    
IniRead
playerActionStructOffset    WQing.inioffsets,playerActionStructOffset                
IniRead
playerCounterOffset        WQing.inioffsets,playerCounterOffset                    
IniRead
playerIntervalOffset        WQing.inioffsets,playerIntervalOffset                    
IniRead
playerFlyMountOffset        WQing.inioffsets,playerFlyMountOffset                    
IniRead
playerFlySpdOffset        WQing.inioffsets,playerFlySpdOffset                    
IniRead
playerTransportModeOffset    WQing.inioffsets,playerTransportModeOffset                
IniRead
playerXposOffset        WQing.inioffsets,playerXposOffset                    
IniRead
playerYposOffset        WQing.inioffsets,playerYposOffset                    
IniRead
playerZposOffset        WQing.inioffsets,playerZposOffset                    
IniRead
SendPacketAddress        WQing.inioffsets,SendPacketAddress                    
IniRead
questFunctionAddress        WQing.inioffsets,questFunctionAddress                    
IniRead
questFunctionOffset        WQing.inioffsets,questFunctionOffset                    
IniRead
npcIdOffset            WQing.inioffsets,npcIdOffset
IniRead
sortedNpcListOffset        WQing.inioffsets,sortedNpcListOffset
IniRead
baseListsOffset        WQing.inioffsets,baseListsOffset
IniRead
npcListOffset            WQing.inioffsets,npcListOffset





npcId8348    
:=    4436
npcId8349    
:=    2288
npcId8350    
:=    3125
npcId8351    
:=    6623
npcId8352    
:=    3417
npcId8353    
:=    3273
npcId8354    
:=    3820
npcId8355    
:=    9305
npcId8356    
:=    3721
npcId8357    
:=    3852
npcId8358    
:=    2584
npcId8359    
:=    6639
npcId8360    
:=    3732
npcId8361    
:=    4066
npcId8362    
:=    4164
npcId8363    
:=    3958
npcId8364    
:=    3948
npcId8365    
:=    3963
npcId8366    
:=    3950
npcId8367    
:=    7198
npcId8368    
:=    7476
npcId8369    
:=    7189
npcId8370    
:=    7156
npcId8371    
:=    7193
npcId8372    
:=    9294
npcId8373    
:=    7146
npcId8374    
:=    7126
npcId8375    
:=    7155
npcId8376    
:=    7149
npcId8377    
:=    7367
npcId8378    
:=    14090
npcId8379    
:=    14090
npcId8380    
:=    14090
npcId8381    
:=    14090
npcId8382    
:=    14090
npcId8383    
:=    14090
npcId8384    
:=    14090
npcId8385    
:=    14090
npcId8386    
:=    14090
npcId8387    
:=    14090
npcId8388    
:=    14090
npcId8389    
:=    14090
npcId8390    
:=    14090
npcId8391    
:=    14090
npcId8392    
:=    14090
npcId8393    
:=    14090
npcId8394    
:=    14090
npcId8395    
:=    14090
npcId8396    
:=    2222
npcId8397    
:=    14090
npcId8398    
:=    12974
npcId27986    
:=    24963 NPC31
npcId27988    
:=    26161 NPC32
npcId27990    
:=    24982 NPC33
npcId27992    
:=    29056 NPC34
npcId27993    
:=    29101 NPC35
npcId27994    
:=    29011 NPC36
npcId27995    
:=    30033 NPC37

get the quest id from item quest id
itemQuest37013 
27986 vol31
itemQuest37014 
27988 vol32
itemQuest37015 
27990 vol33
itemQuest37016 
27992 vol34
itemQuest37017 
27993 vol35
itemQuest37018 
27994 vol36
itemQuest37019 
27995 vol37



xCoord8348    
:=    1150922672
xCoord8349    
:=    3302385319
xCoord8350    
:=    1148557837
xCoord8351    
:=    3303292969
xCoord8352    
:=    1142127397 
xCoord8353    
:=    1156113401
xCoord8354    
:=    1156110694
xCoord8355    
:=    1155705131
xCoord8356    
:=    1158297134
xCoord8357    
:=    1159710894
xCoord8358    
:=    1160108504
xCoord8359    
:=    1134178481
xCoord8360    
:=    3285809922
xCoord8361    
:=    3290771596
xCoord8362    
:=    3308040683
xCoord8363    
:=    3307254531
xCoord8364    
:=    3297816607
xCoord8365    
:=    1135247292
xCoord8366    
:=    1143076818
xCoord8367    
:=    1160136679
xCoord8368    
:=    1160190578
xCoord8369    
:=    1152945684
xCoord8370    
:=    1153034387
xCoord8371    
:=    1152265176
xCoord8372    
:=    1159054997
xCoord8373    
:=    1159086744
xCoord8374    
:=    1159662514
xCoord8375    
:=    1160067557
xCoord8376    
:=    1159191720
xCoord8377    
:=    3305664239
xCoord8378    
:=    1151616945
xCoord8379    
:=    1151616945
xCoord8380    
:=    1151616945
xCoord8381    
:=    1151616945
xCoord8382    
:=    1151616945
xCoord8383    
:=    1151616945
xCoord8384    
:=    1151616945
xCoord8385    
:=    1151616945
xCoord8386    
:=    1151616945
xCoord8387    
:=    1151616945
xCoord8388    
:=    1151616945
xCoord8389    
:=    1151616945
xCoord8390    
:=    1151616945
xCoord8391    
:=    1151616945
xCoord8392    
:=    1151616945
xCoord8393    
:=    1151616945
xCoord8394    
:=    1151616945
xCoord8395    
:=    1151616945
xCoord8396    
:=    1154882031
xCoord8397    
:=    1151616945
xCoord8398    
:=    1151749044
xCoord27986    
:=    1158617088 ;1158578176 
xCoord27988    
:=    1159421073 ;1159397376 
xCoord27990    
:=    1160310567 ;1160298496 
xCoord27992    
:=    3308413237 ;3308396544 
xCoord27993    
:=    3307132372 ;3307085824 
xCoord27994    
:=    3306061824 
xCoord27995    
:=    3302005113 ;3301933056 

yCoord8348    
:=    1130077739
yCoord8349    
:=    1130079036
yCoord8350    
:=    1130021976
yCoord8351    
:=    1141044657
yCoord8352    
:=    1130042464
yCoord8353    
:=    1131590663
yCoord8354    
:=    1131336105
yCoord8355    
:=    1130076569
yCoord8356    
:=    1130234513
yCoord8357    
:=    1130031613
yCoord8358    
:=    1132208056
yCoord8359    
:=    1130168939
yCoord8360    
:=    1134634916
yCoord8361    
:=    1130096160
yCoord8362    
:=    1141030586
yCoord8363    
:=    1140993714
yCoord8364    
:=    1141067583
yCoord8365    
:=    1130090536
yCoord8366    
:=    1132295168
yCoord8367    
:=    1130628796
yCoord8368    
:=    1130627738
yCoord8369    
:=    1130689735
yCoord8370    
:=    1130518019
yCoord8371    
:=    1130027594
yCoord8372    
:=    1130154748
yCoord8373    
:=    1130073206
yCoord8374    
:=    1130614368
yCoord8375    
:=    1130092715
yCoord8376    
:=    1130117314
yCoord8377    
:=    1130496656
yCoord8378    
:=    1130077739
yCoord8379    
:=    1130077739
yCoord8380    
:=    1130077739
yCoord8381    
:=    1130077739
yCoord8382    
:=    1130077739
yCoord8383    
:=    1130077739
yCoord8384    
:=    1130077739
yCoord8385    
:=    1130077739
yCoord8386    
:=    1130077739
yCoord8387    
:=    1130077739
yCoord8388    
:=    1130077739
yCoord8389    
:=    1130077739
yCoord8390    
:=    1130077739
yCoord8391    
:=    1130077739
yCoord8392    
:=    1130077739
yCoord8393    
:=    1130077739
yCoord8394    
:=    1130077739
yCoord8395    
:=    1130077739
yCoord8396    
:=    1130136969
yCoord8397    
:=    1130077739
yCoord8398    
:=    1130077739
yCoord27986    
:=    1132134400 ;1132068864 
yCoord27988    
:=    1129929738 ;1157840896 
yCoord27990    
:=    1131413760 ;1131413504 
yCoord27992    
:=    1128983652 ;1128792064 
yCoord27993    
:=    1124469576 ;1124204544 
yCoord27994    
:=    1129447424 
yCoord27995    
:=    1130174451 ;1130102784 

zCoord8348    
:=    1148590119
zCoord8349    
:=    1115520494
zCoord8350    
:=    1166235043
zCoord8351    
:=    3298807030
zCoord8352    
:=    1138268421
zCoord8353    
:=    1125415571
zCoord8354    
:=    1126821456
zCoord8355    
:=    1151963447
zCoord8356    
:=    1155092500
zCoord8357    
:=    1161783713
zCoord8358    
:=    1166197254
zCoord8359    
:=    1156163994
zCoord8360    
:=    1158984367
zCoord8361    
:=    1160585847
zCoord8362    
:=    1137289047
zCoord8363    
:=    1147499808
zCoord8364    
:=    1126624420
zCoord8365    
:=    3294985570
zCoord8366    
:=    3305352074
zCoord8367    
:=    3303123588
zCoord8368    
:=    3302758014
zCoord8369    
:=    3302842554
zCoord8370    
:=    3302573762
zCoord8371    
:=    3299372414
zCoord8372    
:=    3292082340
zCoord8373    
:=    1125247490
zCoord8374    
:=    1058505046
zCoord8375    
:=    1142385946
zCoord8376    
:=    1143040737
zCoord8377    
:=    1162223519
zCoord8378    
:=    1147533066
zCoord8379    
:=    1147533066
zCoord8380    
:=    1147533066
zCoord8381    
:=    1147533066
zCoord8382    
:=    1147533066
zCoord8383    
:=    1147533066
zCoord8384    
:=    1147533066
zCoord8385    
:=    1147533066
zCoord8386    
:=    1147533066
zCoord8387    
:=    1147533066
zCoord8388    
:=    1147533066
zCoord8389    
:=    1147533066
zCoord8390    
:=    1147533066
zCoord8391    
:=    1147533066
zCoord8392    
:=    1147533066
zCoord8393    
:=    1147533066
zCoord8394    
:=    1147533066
zCoord8395    
:=    1147533066
zCoord8396    
:=    1148540945
zCoord8397    
:=    1147533066
zCoord8398    
:=    1148064643
zCoord27986    
:=    3309340672 ;3309338624
zCoord27988    
:=    3314125167 ;3312656384
zCoord27990    
:=    3312082423 ;3312082944
zCoord27992    
:=    3308731016 ;3308724224
zCoord27993    
:=    3309149807 ;3309133824
zCoord27994    
:=    3308560384
zCoord27995    
:=    3309810477 ;3309789184

Extra waypoints
xCoord27988Extra    
:=    1159425374
yCoord27988Extra    
:=    1129953460
zCoord27988Extra    
:=    3314110644

xCoord27993Extra    
:=    3307105265
yCoord27993Extra    
:=    1124618005
zCoord27993Extra    
:=    3309140108


xCoord27988to27992Extra    
:=    xCoord0to27992Extra := 1149833800
yCoord27988to27992Extra    
:=    yCoord0to27992Extra    :=    1129694932
zCoord27988to27992Extra    
:=    zCoord0to27992Extra    :=    3311194131



;List Variables

ActiveList 
=
InActiveList =
ActiveNitems := 0
InActiveNitems 
:= 0

createGui
()

    
settimermainloop500

return


GuiClose:
ExitApp

showStats
:
Gui Submitnohide

selectedPlayer 
:= Active

loop 
%nPWs%
{    
    
tempId := PWlist%A_Index%
    if(
playername%tempid% = selectedPlayer)
    {
        
tempPlayer := tempid

        
break
    }
}
StringSplitstatusParamPWstatus%tempPlayer%, `,
questInfo := getQuestInfo(nextQuest%tempPlayer%)
currentStatus := statusParam1 . " [" . questInfo . "]"
GuiControl,, StatusText, %currentStatus%

;currentCoords := getCurrentCoords(PWidList%selectedPlayer%, "
`r`n")
;GuiControl,, StatusText2, %currentCoords%

return

Button>>:
gui submit, nohide
item = %InActive%
if(item <> "")
{
    removeItem("inactive", item)
    addItem("active", item)
    loop %nPWs%
    {    
        tempId := PWlist%A_Index%
        if(playername%tempid% = item)
        {
            tempPlayer := tempid
            logthis("selected player: " . tempPlayer, "main")

            break
        }
    }
    PWstatus%tempPlayer% := "Idle"
}
return

Button<<:
gui submit, nohide
item = %Active%
if(item <> "")
{
    removeItem("active", item)
    addItem("inactive", item)
    loop %nPWs%
    {    
        tempId := PWlist%A_Index%
        if(playername%tempid% = item)
        {
            tempPlayer := tempid
            logthis("selected player: " . tempPlayer, "main")

            break
        }
    }
    PWstatus%tempPlayer% := "Idle"
}
return

addItem(listBox, item)
{
    %listBox%List := %listBox%List . "
`n" . item
    Sort, %listBox%List, U D`n
    if errorlevel = 0
        %listBox%Nitems := %listBox%Nitems + 1
    theList := %listBox%List
    GuiControl,, %listBox%, %theList%
    
}

removeItem(listBox, item)
{
    StringReplace, theList, %listBox%List, `n%item%
    %listBox%List := theList
    GuiControl,, %listBox%, %theList%
    %listBox%Nitems := %listBox%Nitems - 1
    if(%listBox%Nitems < 1)
    {
        createGui()

    }
}

createGui()
{
    global

    Gui, Destroy
    Gui +Delimiter`n
    Gui, Add, ListBox, vInActive x16 y44 w100 h147 %InActiveList%
    Gui, Add, Button, x126 y84 w50 h30 , >>
    Gui, Add, Button, x126 y124 w50 h30 , <<
    Gui, Add, ListBox, vActive gShowStats x186 y44 w110 h147 %ActiveList%
    Gui, Add, Text, x16 y14 w100 h20 , Inactive
    Gui, Add, Text, x186 y14 w110 h20 , Doing WQ
    Gui, Add, Text, vStatusText x316 y44 w130 h20 , Stats
    Gui, Add, Text, vStatusText2 x316 y64 w130 h100 , Coords
    Gui, Show, x131 y91 h215 w464, Auto WQ
}


mainLoop:

;Get all clients with a char logged in


WinGet, winList ,List
PWlist =
nPWs = 0
loop %winList%
{

    windId := winList%A_Index%

    WinGet, processName ,processName , ahk_id %windId%
    if(processName = "
elementclient.exe")
    {
        
        Winget, pId, PID, ahk_id %windId%
        
        theId = ahk_pid %pid%
        playerName := getPlayerName(theId)
        if(playerName <> "")
        {
            playerName%pId% = %playername%
            playername = %pId%
            nPWs := nPWs + 1
            PWlist%nPWs% = %playerName%
            PWidList%playerName% = %theId%
        }
    }
}



;Add any newly logged chars to the InActive list

addNewPlayers()

removeNonPresentPlayers()

StringSplit, activeArray, ActiveList, `n

loop %activeArray0%
{
    if(A_index > 1)
    {
        index := A_index
        playerName := activeArray%index%
        playerId := 0
        tolog = updating status: %playername%
        logThis(toLog, "
main")
        loop %nPWs%
        {    
            pwId := PWlist%A_Index%
            if(playername%pwid% = playername)
            {
                playerId := pwid
                break
            }
        }
        if(playerId != 0)
        {
            updateStatus(playerId)
        }
    
    }
}

Gui Submit, nohide
selectedPlayer := Active
playerId := 0
loop %nPWs%
{    
    pwId := PWlist%A_Index%
    if(playername%pwid% = selectedPlayer)
    {
        playerId := pwid
        break
    }
}
if(playerId !=0)
{
    StringSplit, statusParam, PWstatus%playerId%, `,

    questInfo := getQuestInfo(nextQuest%playerId%)
    currentStatus := statusParam1 . " 
[" . questInfo . "]"
    GuiControl,, StatusText, %currentStatus%
    
    currentCoords := getCurrentCoords(PWidList%playerId%, "
`r`n")
    GuiControl,, StatusText2, %currentCoords%
}

return

getQuestInfo(questId)
{

    local returnValue := ""
    if(questId = 8348)
    {
    returnValue = Volume 1
    }
    else if(questId = 8349)
    {
    returnValue = Volume 2    
    }
    else if(questId = 8350)
    {
    returnValue = Volume 3    
    }
    else if(questId = 8351)
    {
    returnValue = Volume 4    
    }
    else if(questId = 8352)
    {
    returnValue = Volume 5    
    }
    else if(questId = 8353)
    {
    returnValue = Volume 6    
    }
    else if(questId = 8354)
    {
    returnValue = Volume 7    
    }
    else if(questId = 8355)
    {
    returnValue = Volume 8    
    }
    else if(questId = 8356)
    {
    returnValue = Volume 9    
    }
    else if(questId = 8357)
    {
    returnValue = Volume 10    
    }
    else if(questId = 8358)
    {
    returnValue = Volume 11    
    }
    else if(questId = 8359)
    {
    returnValue = Volume 12    
    }
    else if(questId = 8360)
    {
    returnValue = Volume 13    
    }
    else if(questId = 8361)
    {
    returnValue = Volume 14    
    }
    else if(questId = 8362)
    {
    returnValue = Volume 15    
    }
    else if(questId = 8363)
    {
    returnValue = Volume 16    
    }
    else if(questId = 8364)
    {
    returnValue = Volume 17    
    }
    else if(questId = 8365)
    {
    returnValue = Volume 18    
    }
    else if(questId = 8366)
    {
    returnValue = Volume 19    
    }
    else if(questId = 8367)
    {
    returnValue = Volume 20    
    }
    else if(questId = 8368)
    {
    returnValue = Volume 21    
    }
    else if(questId = 8369)
    {
    returnValue = Volume 22    
    }
    else if(questId = 8370)
    {
    returnValue = Volume 23    
    }
    else if(questId = 8371)
    {
    returnValue = Volume 24    
    }
    else if(questId = 8372)
    {
    returnValue = Volume 25    
    }
    else if(questId = 8373)
    {
    returnValue = Volume 26    
    }
    else if(questId = 8374)
    {
    returnValue = Volume 27    
    }
    else if(questId = 8375)
    {
    returnValue = Volume 28    
    }
    else if(questId = 8376)
    {
    returnValue = Volume 29    
    }
    else if(questId = 8377)
    {
    returnValue = Volume 30    
    }
    else if(questId = 8378)
    {
    returnValue = No Bonus    
    }
    else if(questId = 8379)
    {
    returnValue = Exp Bonus    
    }
    else if(questId = 8380)
    {
    returnValue = SP Bonus    
    }
    else if(questId = 8381)
    {
    returnValue = Reputation    
    }
    else if(questId = 8382)
    {
    returnValue = Gold Bonus    
    }
    else if(questId = 8383)
    {
    returnValue = Mirage    
    }
    else if(questId = 8384)
    {
    returnValue = No Bonus    
    }
    else if(questId = 8385)
    {
    returnValue = Exp Bonus    
    }
    else if(questId = 8386)
    {
    returnValue = SP Bonus    
    }
    else if(questId = 8387)
    {
    returnValue = Reputation    
    }
    else if(questId = 8388)
    {
    returnValue = Gold Bonus    
    }
    else if(questId = 8389)
    {
    returnValue = Mirage    
    }
    else if(questId = 8390)
    {
    returnValue = No Bonus    
    }
    else if(questId = 8391)
    {
    returnValue = Exp Bonus    
    }
    else if(questId = 8392)
    {
    returnValue = SP Bonus    
    }
    else if(questId = 8393)
    {
    returnValue = Reputation    
    }
    else if(questId = 8394)
    {
    returnValue = Gold Bonus    
    }
    else if(questId = 8395)
    {
    returnValue = Mirage    
    }
    else if(questId = 8396)
    {
    returnValue = Elder
    }
    else if(questId = 8397)
    {
    returnValue = Armerigo
    }
    else if(questId = 8398)
    {
    returnValue = Penney
    }
    else if(questId = 8399)
    {
    returnValue = Volume 31
    }
    else if(questId = 8400)
    {
    returnValue = Volume 32
    }
    else if(questId = 8401)
    {
    returnValue = Volume 33
    }
    else if(questId = 8402)
    {
    returnValue = Volume 34
    }
    else if(questId = 8403)
    {
    returnValue = Volume 35
    }
    else if(questId = 8404)
    {
    returnValue = Volume 36
    }
    else if(questId = 8405)
    {
    returnValue = Volume 37
    }
    return returnValue
}
    


getPlayerName(theId)
{
    global
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local playerNamePointer := ReadMemory(playerPointer + playerNameOffset, theId)
    
    local playerNameLength := ReadMemory(playerNamePointer + nameLengthOffset, theId)
    
    local playerName := ""
    local tempOffset := 0xFFFFFFFD

    loop %playerNameLength%
    {
        tempOffset := tempOffset + 0x2
        local character := ReadMemory(playerNamePointer + tempOffset,theId, 2)

        SetFormat, IntegerFast, hex
        character += 0  
        character .= ""  
        SetFormat, IntegerFast, d

        playerName := playerName Hex2txt(character)
    }
    
    return playerName
}

getItemQuestInv(theId, slotIndex)
{
    global
    
    ;base + [$1C + [$34 + [
$D8C + [$0C + [(inventoryIndex*4) + [<itemStruct>]]]]]]
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId) ;+0x1C
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId) ;+0x34
    local inventoryPointer := ReadMemory(playerPointer + 0xD8C, theId) ;+0xD8C
    local inventoryBase := ReadMemory(inventoryPointer + 0xC, theId) ;+0xC
    local itemSlot := ReadMemory(inventoryBase + (slotIndex*4), theId)
    
    if(itemSlot = 0)
    {
        return 0
    }
    
    local id := ReadMemory(itemSlot + 0x08, theId)
    
    
    ;tolog = inventoryBase : %inventoryBase% , itemSlot%slotIndex% : %itemSlot% , id : %id%
    ;    logThis(toLog, "
debug")
    
    return id
}

isAWqQuestItem(id)
{
    if(id = 37013 or id = 37014 or id = 37015 or id = 37016 or id = 37017 or id = 37018 or id = 37019)
    {
        return true
    }
    
    return false
}

getNextQuest(theId)
{
    global
    
    local returnValue := 0
    local questId := 8348
    loop 51
    {    
        value := checkQuestPresent(questId, theId)    
        if(value = 0)
        {
            returnValue := questId
            break
        }
        questId := questId + 1
    }
    
    if(returnValue = 0)
    {
        loop 32
        {    
            index := A_Index - 1
            value := getItemQuestInv(theId, index)
            if(value != 0 and isAWqQuestItem(value))
            {
                returnValue := itemQuest%value% ;convert item id to quest id
                break
            }
        }
    }

    return returnValue
}

npcIsClose(questId, theId, ignoreY = false)
{

    global
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    
    SetFormat, IntegerFast, hex
    
    local xCoord := ReadMemory(playerPointer + playerXposOffset, theId)
    local yCoord := ReadMemory(playerPointer + playerYposOffset, theId)
    local zCoord := ReadMemory(playerPointer + playerZposOffset, theId)
    
    local npcX := xCoord%questId%
    local npcY := yCoord%questId%
    local npcZ := zCoord%questId%
    
    local extraNpcX := xCoord%questId%Extra
    local extraNpcY := yCoord%questId%Extra
    local extraNpcZ := zCoord%questId%Extra
    
    SetFormat, IntegerFast, d

    local fX := hextofloat(xcoord)
    local fY := hextofloat(ycoord)
    local fZ := hextofloat(zcoord)
    
    local fNpcX := hextofloat(npcX)
    local fNpcY := hextofloat(npcY)
    local fNpcZ := hextofloat(npcZ)
    
    local dX := fX - fNpcX
    local dY := fY - fNpcY
    local dZ := fZ - fNpcZ
    
    if(!ignoreY)
    {
        distance := sqrt(dX * dX + dY * dY + dZ * dZ)
    }
    else
    {
        distance := sqrt(dX * dX + dZ * dZ)
    }

    if(distance < 5)
    {
        return 1
    }
    else if(extraNpcX and extraNpcY and extraNpcZ)
    {
        local fExtraNpcX := hextofloat(ExtraNpcX)
        local fExtraNpcY := hextofloat(ExtraNpcY)
        local fExtraNpcZ := hextofloat(ExtraNpcZ)
        
        local dX := fX - fExtraNpcX
        local dY := fY - fExtraNpcY
        local dZ := fZ - fExtraNpcZ
        
        if(!ignoreY)
        {
            distance := sqrt(dX * dX + dY * dY + dZ * dZ)
        }
        else
        {
            distance := sqrt(dX * dX + dZ * dZ)
        }

        if(distance < 5)
        {
            return 1
        }
        else
        {
            return 0
        }
    }
    
    return 0

}

LogCoords(questId, theId)
{

    global
    
    questId += 0
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    
    SetFormat, IntegerFast, hex
    
    local xCoord := ReadMemory(playerPointer + playerXposOffset, theId)
    local yCoord := ReadMemory(playerPointer + playerYposOffset, theId)
    local zCoord := ReadMemory(playerPointer + playerZposOffset, theId)
    
    local npcX := xCoord%questId%
    local npcY := yCoord%questId%
    local npcZ := zCoord%questId%
    
    SetFormat, IntegerFast, d

    local fX := hextofloat(xcoord)
    local fY := hextofloat(ycoord)
    local fZ := hextofloat(zcoord)
    
    local fNpcX := hextofloat(npcX)
    local fNpcY := hextofloat(npcY)
    local fNpcZ := hextofloat(npcZ)
    
    local dX := fX - fNpcX
    local dY := fY - fNpcY
    local dZ := fZ - fNpcZ
    
    distance := sqrt(dX * dX + dY * dY + dZ * dZ)

    ;tolog = npc%questId% distance: %distance% : %fX%->%fNpcX%, %fY%->%fNpcY%, %fZ%->%fNpcZ%
    ;    logThis(toLog, "
coords")
}

handleNpc(questId, theId)
{
    global
    
    SetFormat, IntegerFast, hex
    
    ;select NPC
    
    npcTypeId := npcId%questId%
    
    ;find the unique npc id
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local baseListsPointer := ReadMemory(structurePointer + baseListsOffset, theId)    
    local npcListPointer := ReadMemory(baseListsPointer + npcListOffset, theId)    
    local sortedNpcList := ReadMemory(npcListPointer + sortedNpcListOffset, theId)
    local npcCount  := ReadMemory(npcListPointer + 0x14, theId)
    
    local i := 0x0
    
    loop %npcCount%
    {
        local npcPointer := ReadMemory(sortedNpcList + i,theId)
        local npcType := ReadMemory(npcPointer + npcIdOffset + 0x4,theId)
        local npcId := ReadMemory(npcPointer + npcIdOffset,theId)
        if(npcType = npcTypeId)
        {
            break
        }
    
    
        i := i + 0x4
    }
    

    revHex(revNpcId, npcId)
    packet := ""
    packet = %packet%0200%revNpcId%
    packetSize := 0x6
    packetSizeStr := "
06"
    sendPacket(packet, packetSizeStr, packetsize, theId)

    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)

    
    loop
    {
        local targetId := ReadMemory(playerPointer + playerTargetIdOffset, theId)
        if(targetId = npcId)
        {
            break
        }
        sleep 100
    }
    
    ;start interaction
    
    packet := ""
    packet = %packet%2300%revNpcId%
    packetSize := 0x6
    packetSizeStr := "
06"
    sendPacket(packet, packetSizeStr, packetsize, theId)
    
    sleep 100
    
    ;hand in quest
    
    revHex(revQuestId, questId)
    packet := ""
    packet = %packet%2500070000000C000000%revQuestId%0000000000000000
    packetSize := 0x16
    packetSizeStr := "
16"
    sendPacket(packet, packetSizeStr, packetsize, theId)
    
    sleep 3000
    
}

getMoveMethod(questId, lastQuestId, theId, isExtraCoord = false)
{
    global
    
    ;tolog = getMoveMethod(%theId%): questId: %questId%, lastQuestId: %lastQuestId%, isExtraCoord: %isExtraCoord%
    ;    logThis(toLog, "")
    
    local x := 0
    local y := 0
    local z := 0
    if(isExtraCoord)
    {
        x := xCoord%questId%Extra
        y := yCoord%questId%Extra
        z := zCoord%questId%Extra
    }
    else
    {
        ;if existing transit coord : use it instead
        if(xCoord%lastQuestId%to%questId%Extra and yCoord%lastQuestId%to%questId%Extra and zCoord%lastQuestId%to%questId%Extra)
        {
            x := xCoord%lastQuestId%to%questId%Extra
            y := yCoord%lastQuestId%to%questId%Extra
            z := zCoord%lastQuestId%to%questId%Extra
        }
        else
        {
            x := xCoord%questId%
            y := yCoord%questId%
            z := zCoord%questId%
        }
    }
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    
    SetFormat, IntegerFast, hex
    
    local xCoord := ReadMemory(playerPointer + playerXposOffset, theId)
    local yCoord := ReadMemory(playerPointer + playerYposOffset, theId)
    local zCoord := ReadMemory(playerPointer + playerZposOffset, theId)
    

    SetFormat, IntegerFast, d
    
    local dX := hextofloat(xcoord) - hextofloat(x)
    local dY := hextofloat(ycoord) - hextofloat(y)
    local dZ := hextofloat(zcoord) - hextofloat(z)
    
    local distance := sqrt(dX * dX + dZ * dZ)
    local returnValue =
    if(distance < 5)
    {
        returnValue = Falling
    }
    else
    {
        local height := 77.0
        local nTimesUp := 3
        
        if(isExtraCoord)
        {
            height := -1.0
            nTimesUp := 0
        }

        returnValue = FlyUp@%nTimesUp%@SetFlyTo@%x%@%y%@%z%@%height%@Flying@Falling
    }    
    
    return returnValue
}


flymodeActive(theId)
{
    global

    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local transportMode := ReadMemory(playerPointer + playerTransportModeOffset, theId)
    
    if(transportMode = 2)
    {
        return 1
    }
    else
    {
        return 0
    }
}


toggleFlying(theId)
{
    global
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local flyMountId := ReadMemory(playerPointer + playerFlyMountOffset, theId)
    
    revHex(revFlyMountId, flyMountId)
    packet := ""
    packet = 280001010C00%revFlyMountId%
    packetSize := 0xA
    packetSizeStr := "
0A"
    sendPacket(packet, packetSizeStr, packetsize, theId)
    sleep 2000
}





setFlyTo(theId, xCoord, yCoord, zCoord, height)
{
    global
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local actionStruct := ReadMemory(playerPointer + playerActionStructOffset, theId)

    MoveTo(Xcoord, Ycoord, Zcoord, 0, theId, actionStruct, height)
}


getCurrentCoords(theId, separator = "
@")
{
    global
    
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)

    local xCoord := ReadMemory(playerPointer + playerXposOffset, theId)
    local yCoord := ReadMemory(playerPointer + playerYposOffset, theId)
    local zCoord := ReadMemory(playerPointer + playerZposOffset, theId)

    returnValue = %xCoord%%separator%%yCoord%%separator%%zCoord%
    
    return returnValue

}

isIdle(theId)
{
    global
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local actionStruct := ReadMemory(playerPointer + playerActionStructOffset, theId)
    local moving := ReadMemory(actionstruct+0x18,theId)

    if(moving = 0)
    {
        return 1
    }
    else
    {
        return 0
    }
    



}



updateStatus(name)
{
    global
    nextQuest%Name% += 0
    nextQuest := nextQuest%Name%
    clientId := PWidList%Name%
    StringSplit, statusParam, PWstatus%Name%, `,
    currentStatus := statusParam1
        tolog = updating status: status: %currentStatus%, quest: %nextQuest%
        logThis(toLog, name)
    if(currentStatus = "
Idle")
    {
        tolog = currentStatus is Idle
        logThis(toLog, name)
        
        nextQuest := getNextQuest(clientId)
        
        if(nextQuest = 0)
        {
            ;Stay Idle
            tolog = No new quest found, staying Idle
            logThis(toLog, Name)
        }
        else ;There is a quest
        {
            if(NpcIsClose(nextQuest, clientId) = 1)
            {
                tolog = Npc is close for quest: %nextQuest%
                logThis(toLog, Name)
                handleNpc(nextQuest, clientId)
                tolog = Handled npc for quest %nextQuest%
                logThis(toLog, Name)
                ;Idle again
            }
            else    ;You have to move to the Npc
            {
                moveMethod := getMoveMethod(nextQuest, nextQuest%Name%, clientId)
                PWstatus%Name% = Moving,%moveMethod%
                tolog = Npc is not close: status: Moving,%moveMethod%
                logThis(toLog, Name)
            }
        }
        
        if(nextQuest != nextQuest%Name%) ;new quest : we just gave back the previous one
        {
            if(logActivities=1)
            {
                LogCoords(nextQuest, clientId)
            }
        }
        else ;quest hasn't changed but we tried to handle it 
        {
            tolog = fail handling quest : try extra coords
            logThis(toLog, Name)
            if(xCoord%nextQuest%Extra and yCoord%nextQuest%Extra and zCoord%nextQuest%Extra) ;try extra coords ?
            {
                tolog = extra coords found
                logThis(toLog, Name)
                ;setFlyTo(clientId, xCoord%nextQuest%Extra, yCoord%nextQuest%Extra, zCoord%nextQuest%Extra)
                
                moveMethod := getMoveMethod(nextQuest, nextQuest%Name%, clientId, true)
                PWstatus%Name% = Moving,%moveMethod%
            }
            else ;no extra coord : fail !
            {
                if(false) ;we are stuck
                {
                    tolog = no extra coords found : stopping bot
                    logThis(toLog, Name)
                    
                    flyUpNew(clientId, 3)
                                
                    PWstatus%Name% = Stuck
                }
                else
                {
                    if(logActivities=1)
                    {
                        tolog = no npc found : restart moving
                        logThis(toLog, Name)
                        LogCoords(nextQuest, clientId)
                    }
                }
            }
        }
        nextQuest%Name% := nextQuest
    }
    else if(currentStatus = "
Moving")
    {
        
        moveMethod := statusParam2
        tolog = Moving: %moveMethod%
        logThis(toLog, Name)
        
        stringsplit, moving, moveMethod, @
        if(moving1 = "
FlyUp")
        {

        
            if(flyModeActive(clientId) = 1)
            {
                tolog = Flymode is active, so Flying Up
                logThis(toLog, Name)
                ;flyUp(clientId, moving2)
                flyUpNew(clientId, moving2)
                tolog = Done flying up
                logThis(toLog, Name)
                ;remove this parameter
                nParams := moving0 - 2
                newMoveMethod := ""
                testValues := moving0 . moving1 . moving2 . moving3 . moving4 . moving5 . moving6
                                logThis(testValues, Name)
                loop %nParams%
                {
                    paramIndex := A_Index + 2
                    testValues := paramindex . newmovemethod . moving%paramindex%
                    logThis(testValues, Name)
                    newMoveMethod := newMoveMethod . moving%paramIndex%
                    if(A_Index < nParams)
                    {
                        newMoveMethod := newMoveMethod . "
@"
                    }
                }
                PWstatus%Name% = Moving,%newMoveMethod%
                tolog = new status: Moving,%newMoveMethod%
                logThis(toLog, Name)
            }
            else
            {
                tolog = Flymode not active, toggling flymode
                logThis(toLog, Name)
                toggleFlying(clientId)
                tolog = Toggled flymode
                logThis(toLog, Name)                
            }
        }
        else if(moving1 = "
SetFlyTo")
        {
            tolog = Setting FlyTo: %moving2%, %moving3%, %moving4%, %moving5%
            logThis(toLog, Name)
            setFlyTo(clientId, moving2, moving3, moving4, moving5)
            currentCoords := getCurrentCoords(clientId)
            
            tolog = Set fly to, current coords: %currentCoords%
            logThis(toLog, Name)
            
            ;remove this parameter
            nParams := moving0 - 5
            newMoveMethod := ""
            loop %nParams%
            {
                paramIndex := A_Index + 5
                newMoveMethod := newMoveMethod . moving%paramIndex%
                if(A_Index < nParams)
                {
                    newMoveMethod := newMoveMethod . "
@"
                }
            }
            PWstatus%Name% = Moving,%newMoveMethod%,%currentCoords%
            tolog = new status: Moving,%newMoveMethod%,%currentCoords%
            logThis(toLog, Name)
        }
        else if(moving1 = "
Flying")
        {
            currentCoords := getCurrentCoords(clientId)

            if (isIdle(clientId) = 1)
            {    
                ;check we are just over our dest
                if(NpcIsClose(nextQuest, clientId, true) = 0) ;not over : start again without falling
                {
                    tolog = end flying not over dest : returning idle
                    logThis(toLog, Name)
                    ;remove these parameters
                    nParams := moving0 - 2
                    newMoveMethod := ""
                    loop %nParams%
                    {
                        paramIndex := A_Index + 2
                        newMoveMethod := newMoveMethod . moving%paramIndex%
                        if(A_Index < nParams)
                        {
                            newMoveMethod := newMoveMethod . "
@"
                        }
                    }
                    MoveMethod := newMoveMethod
                    PWstatus%Name% = Idle
                }
                else ;we are over : fall
                {
                    ;Done Flying
                    tolog = Done flying
                    logThis(toLog, Name)    
                    ;remove this parameter
                    nParams := moving0 - 1
                    newMoveMethod := ""
                    loop %nParams%
                    {
                        paramIndex := A_Index + 1
                        newMoveMethod := newMoveMethod . moving%paramIndex%
                        if(A_Index < nParams)
                        {
                            newMoveMethod := newMoveMethod . "
@"
                        }
                    }
                    MoveMethod := newMoveMethod
                    
                    PWstatus%Name% = Moving,%MoveMethod%,%currentCoords%
                    tolog = flying, new status: Moving,%MoveMethod%,%currentCoords%
                    logThis(toLog, Name)
                }
            }
        }
        else if(moving1 = "
Falling")
        {
            tolog = Falling now
            logThis(toLog, Name)
            if(flymodeActive(clientId) = 1)
            {
                tolog = Currently flying, toggling flymode
                logThis(toLog, Name)
                toggleFlying(clientId)
                tolog = Toggled flymode
                logThis(toLog, Name)
            }
            else
            {
                tolog = Currently not flying
                logThis(toLog, Name)
            
                currentCoords := getCurrentCoords(clientId)
                if (isIdle(clientId) = 1)
                {
                    if(NpcIsClose(nextQuest, clientId) = 0)
                    {
                        tolog = Npc not close, toggling flymode
                            logThis(toLog, Name)
                        toggleFlying(clientId)
                        tolog = Toggled flymode
                            logThis(toLog, Name)
                            
                        flyUpNew(clientId, 3)
                            
                        PWstatus%Name% = Stuck
                    }
                    else
                    {
                        ;Stopped Falling
                        tolog = Stopped falling
                        logThis(toLog, Name)
                        ;remove this parameter
                        nParams := moving0 - 1
                        newMoveMethod := ""
                        loop %nParams%
                        {
                            paramIndex := A_Index + 1
                            newMoveMethod := newMoveMethod . moving%paramIndex%
                            if(A_Index < nParams)
                            {
                                newMoveMethod := newMoveMethod . "
@"
                            }
                        }
                        PWstatus%Name% = Idle
                    }
                }
                
                tolog := PWstatus%Name%
                logThis("
status" . toLog, Name)
                ;else
                ;{
                ;    if(flymodeActive(clientId) = 1)
                ;    {
                ;        toggleFlying(clientId)
                ;    }
                ;    PWstatus%Name% = Moving,%MoveMethod%,%currentCoords%
                ;}
            }
        }                
        
    }
}


addNewPlayers()
{
    global
    
    loop %nPWs%
    {
        playerId := PWlist%A_Index%
        playername := playername%playerid%
        if(playerNameInLists(playerName) = 0)
        {
            addItem("
inactive", playername)
            loop %nPWs%
            {    
                tempId := PWlist%A_Index%
                if(playername%tempid% = playername)
                {
                    tempPlayer := tempid
                    logthis("
selected player" . tempPlayer, "main")

                    break
                }
            }
            PWstatus%tempPlayer% := "
Idle"

        }
    }
}

removeNonPresentPlayers()
{
    global
    
    StringSplit, activeArray, ActiveList, `n
    
    loop %ActiveNitems%
    {
        index := A_Index + 1
        playerInList := activeArray%index%
        playerPresent := 0
        loop %nPWs%
        {
            playerid := PWlist%A_Index%
            playername := playername%playerid%
            if(playerInList = playerName)
            {
                playerPresent = 1
                break
            }
        }
        if (playerPresent = 0)
        {
            removeItem("
active", playerInList)
        }
    }
    StringSplit, inactiveArray, inActiveList, `n
    
    loop %InActiveNitems%
    {
        index := A_Index + 1
        playerInList := inactiveArray%index%
        playerPresent := 0
        loop %nPWs%
        {
            playerid := PWlist%A_Index%
            playername := playername%playerid%
            if(playerInList = playerName)
            {
                playerPresent = 1
                break
            }
        }
        if (playerPresent = 0)
        {
            removeItem("
inactive", playerInList)
        }
    }
    

}


playerNameInLists(playerName)
{

    global

    StringSplit, activeArray, ActiveList, `n
    playerPresent := 0
    loop %ActiveNitems%
    {
        index := A_Index + 1
        playerInList := activeArray%index%
        if(playerInList = playerName)
        {
            playerPresent := 1
            break
        }
    }
    if(playerPresent = 0)
    {
        StringSplit, inactiveArray, inActiveList, `n

        loop %InActiveNitems%
        {
            index := A_Index + 1
            playerInList := inactiveArray%index%

            if(playerInList = playerName)
            {
                playerPresent := 1
                break
            }
        }
    }

    return playerPresent
}


checkQuestPresent(questId, client)
{
    global

    ;Get the process Id from the given client title
    winget, pid, PID, %client%

    ;Get the process handle from the given client title
    If ProcessHandle%PID% = 
    {
        ProcessHandle%PID%     :=     DllCall("
OpenProcess", "int", 2035711, "char", 1, "UInt", PID, "UInt")
        logThis("
ProcessHandle" . ProcessHandle%PID%, "main")
    }
    
    functionSize := 100
    
    ;Allocate memory to store the packet to be sent, and the method to call the send packet function
    If returnAddress%PID% = 
    {
        returnAddress%PID%     :=       DllCall("
VirtualAllocEx", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", 0x4, "Uint", 0x1000, "Uint", 0x40)
        logThis("
returnAddress" . returnAddress%PID%, "main")
    }
    If functionAddress%PID% = 
    {
        functionAddress%PID% :=       DllCall("
VirtualAllocEx", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", functionSize, "Uint", 0x1000, "Uint", 0x40)
        logThis("
functionAddress" . functionAddress%PID%, "main")
    }


    revHex(revReturnAddress, returnAddress%PID%)    
    revHex(revQuestId, questId)
    revHex(revQuestFunctionAddress, questFunctionAddress)
    revHex(revBaseAddress, realBaseAddress)
    revHex(revQuestFunctionOffset, questFunctionOffset)
    revHex(revPlayerOffSet, playerOffSet, 2)


    ;60             PUSHAD
    ;B8 80 45 66 00     MOV     EAX, 00664580
    ;8B 0D 7C 65 98 00     MOV     ECX, DWORD PTR [98657C]
    ;8B 49 1C         MOV     ECX, DWORD PTR [ECX+1C]
    ;8B 49 30         MOV     ECX, DWORD PTR [ECX+34]
    ;8B 89 DC 0D         MOV     ECX, DWORD PTR [ECX+DDC]
    ;68 DD 06         PUSH    6DD
    ;FF D0             CALL    NEAR EAX
    ;A3 32 54 76 98     MOV     DWORD PTR [98765432], EAX
    ;61             POPAD
    ;C3            RET



    func =                    
    func = %func%60                    ;PUSHAD
    func = %func%B8%revQuestFunctionAddress%    ;MOV     EAX, questFunction
    func = %func%8B0D%revBaseAddress%        ;MOV     ECX, DWORD PTR [baseAddress]
    func = %func%8B491C                ;MOV     ECX, DWORD PTR [ECX+1C]
    func = %func%8B49%revPlayerOffSet%                ;MOV     ECX, DWORD PTR [ECX+playerOffSet]
    func = %func%8B89%revQuestFunctionOffset%    ;MOV     ECX, DWORD PTR [ECX+questFuncOffset]
    func = %func%68%revQuestId%            ;PUSH    questId
    func = %func%FFD0                ;CALL    NEAR EAX
    func = %func%A3%revReturnAddress%        ;MOV     DWORD PTR [returnAddress], EAX
    func = %func%61                    ;POPAD
    func = %func%C3                    ;RET


    MCode(checkQuestFunction, func)
    
    
    DllCall("
WriteProcessMemory", "UInt", ProcessHandle%PID%, "UInt", functionAddress%PID%, "Uint", &checkQuestFunction, "Uint", functionSize, "Uint *", 0)
    
    
    
    
    SetFormat, IntegerFast, d
    
    hThrd := DllCall("
CreateRemoteThread", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", 0, "Uint", functionAddress%PID%, "Uint", 0, "Uint", 0, "Uint", 0)
    loop
    {
        result := DllCall( "
WaitForSingleObject", UInt,hThrd, UInt,50 ) 
        if(result <> 258)
        {
            break
        }
        sleep 50
        if(A_Index > 100)
        {
            break
        }
    }
    
    
    local returnValue := readMemory(returnAddress%PID%, client)
    
    DllCall( "
CloseHandle", UInt,hThrd )
    
    ;DllCall("
VirtualFreeEx", "Uint", ProcessHandle, "Uint", functionAddress, "Uint", 0, "Uint", 0x8000)
    
    ;DllCall("
VirtualFreeEx", "Uint", ProcessHandle, "Uint", returnAddress, "Uint", 0, "Uint", 0x8000)
    
    ;DllCall( "
CloseHandle", UInt,ProcessHandle ) 
    
    return returnValue
    
}


sendPacket(packet, packetSizeStr, packetsize, client)
{
    global

    MCode(processedPacket, packet)
    
    ;Get the process Id from the given client title
    winget, pid, PID, %client%

    ;Get the process handle from the given client title
    If ProcessHandle%PID% = 
    {
        ProcessHandle%PID%     :=     DllCall("
OpenProcess", "int", 2035711, "char", 1, "UInt", PID, "UInt")
        logThis("
ProcessHandle" . ProcessHandle%PID%, "main")
    }
    
    ;Allocate memory to store the packet to be sent, and the method to call the send packet function
    If packetAddress%PID% =
    {
        packetAddress%PID%     :=       DllCall("
VirtualAllocEx", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", packetSize, "Uint", 0x1000, "Uint", 0x40)
        logThis("
packetAddress" . packetAddress%PID%, "main")
    }
    If functionAddress_%PID% =
    {
        functionAddress_%PID% :=       DllCall("
VirtualAllocEx", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", 0x1B, "Uint", 0x1000, "Uint", 0x40)
        logThis("
functionAddress" . functionAddress_%PID%, "main")
    }
    
    revHex(packetAddressRev, packetAddress%PID%)
    revHex(revSendPacketAddress, SendPacketAddress)
    revHex(revBaseAddress, realBaseAddress)


    func =
    func = %func%60                ;PUSHAD
    func = %func%B8%revSendPacketAddress%    ;MOV     EAX, sendPacketAddress
    func = %func%8B0D%revBaseAddress%    ;MOV     ECX, DWORD PTR [revBaseAddress]
    func = %func%8B4920            ;MOV     ECX, DWORD PTR [ECX+20]
    func = %func%BF%packetAddressRev%    ;MOV     EDI, packetAddress    //src pointer
    func = %func%6A%packetSizeStr%        ;PUSH    packetSize        //size
    func = %func%57                ;PUSH    EDI
    func = %func%FFD0            ;CALL    EAX
    func = %func%61                ;POPAD
    func = %func%C3                ;RET    
    MCode(sendFunction, func)

    
    DllCall("
WriteProcessMemory", "UInt", ProcessHandle%PID%, "UInt", packetAddress%PID%, "Uint", &processedPacket, "Uint", packetSize, "Uint *", 0)
    DllCall("
WriteProcessMemory", "UInt", ProcessHandle%PID%, "UInt", functionAddress_%PID%, "Uint", &sendFunction, "Uint", 0x1B, "Uint *", 0)

    hThrd := DllCall("
CreateRemoteThread", "Uint", ProcessHandle%PID%, "Uint", 0, "Uint", 0, "Uint", functionAddress_%PID%, "Uint", 0, "Uint", 0, "Uint", 0)
    loop
    {
        result := DllCall( "
WaitForSingleObject", UInt,hThrd, UInt,50 ) 
        if(result <> 258)
        {
            break
        }
        sleep 50
        if(A_Index > 100)
        {
            break
        }
    }
    
    DllCall( "
CloseHandle", UInt,hThrd )
    
    ;DllCall("
VirtualFreeEx", "Uint", ProcessHandle, "Uint", packetAddress, "Uint", 0, "Uint", 0x8000)
    ;DllCall("
VirtualFreeEx", "Uint", ProcessHandle, "Uint", functionAddress_, "Uint", 0, "Uint", 0x8000)
    
    ;DllCall( "
CloseHandle", UInt,ProcessHandle ) 
}


MCode(ByRef code, hex) { ; allocate memory and write Machine Code there
   VarSetCapacity(code,StrLen(hex)//2)
   Loop % StrLen(hex)//2
      NumPut("
0x" . SubStr(hex,2*A_Index-1,2), code, A_Index-1, "Char")
}

revHex(byref CodeRev, Code, requestedLength=8)
{
    ;Return a reverse hex string of Code
    
    SetFormat, IntegerFast, hex
    Code += 0  
    Code .= ""  
    SetFormat, IntegerFast, d
    CodeRev =
    temp2 := substr(Code, 3)
    temp2 := "
00000000" . temp2

    temp := strlen(temp2)-requestedLength + 1
    temp2 := substr(temp2, temp)

    i := requestedLength - 1
    looplength := requestedLength // 2
    loop %loopLength%
    {

        CodeRev := CodeRev . substr(temp2, i, 2)
        i := i - 2
    }
}



MoveTo(X, Y, Z, moveType, client, actionStruct, height=-1.0)
{
    actionList := ReadMemory(actionStruct+0x30,client)
    MoveAction := ReadMemory(actionList+0x4,client)

    writeMemory(0, MoveAction+0x8, client)                ;Action finished = 0
    writeMemory(1, MoveAction+0x14, client)                ;Action Start = 1    
    writeMemory(X, MoveAction + 0x20, client)
    writeMemory(Y, MoveAction + 0x24, client)
    writeMemory(Z, MoveAction + 0x28, client)
    writeMemory(FloatToHex(height), MoveAction + 0x68, client)
    if(height >= 0.0)
    {
        writeMemory(26625, MoveAction + 0x64, client)
        writeMemory(256, MoveAction + 0x6C, client) 
    }
    else 
    {
        writeMemory(26624, MoveAction + 0x64, client)
        writeMemory(65536, MoveAction + 0x6C, client) 
    }
    writeMemory(moveType, MoveAction + 0x2C, client)        ;Not supported yet
    writeMemory(MoveAction, actionstruct+0xC, client)
    writeMemory(1, actionstruct+0x18, client)
    writeMemory(moveAction, actionstruct+0x14, client)
}



flyUp(client, times)
{

    global

    local loopn := times - 1
    local time := 0.1 ;s
    local baseAddress := ReadMemory(realBaseAddress,client) ;00986c00
    local pointer1 := ReadMemory(baseAddress+baseOffset,client) ;04c88408
    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 100
            local packet := "
0700"
            local counter := readmemory(player+playerCounterOffset, client, 2)
            local interval := readmemory(player+playerIntervalOffset, client, 2) ;0x01F4
            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"        ;direction
            revHex(value, moveType, 2)
            packet := packet . value
            revHex(value, counter, 4)
            packet := packet . value
            packet := packet . "
F401"    ;unknown value

            writeMemory(counter + 1,player+playerCounterOffset, client, 2)
            writeMemory(sendYcoordHex,player+playerYposOffset, client)
            sendPacket(packet, "
16", 0x16, client)    

        }
        ;Send an invalid packet so the server updates your location properly :P:P
        
        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"        ;direction
        revHex(value, moveType, 2)
        packet := packet . value
        revHex(value, counter, 4)
        packet := packet . value
        packet := packet . "
0000"    ;unknown value

        writeMemory(counter + 1,player+playerCounterOffset, client, 2)
        writeMemory(sendYcoordHex,player+playerYposOffset, client)
        sendPacket(packet, "
16", 0x16, client)    
    

        sleep 2000
    }
        SetFormat, IntegerFast, d
}

flyUpNew(theId, nTimes)
{
    global
    local baseAddress := ReadMemory(realBaseAddress, theId)
    local structurePointer := ReadMemory(baseAddress + baseOffset, theId)
    local playerPointer := ReadMemory(structurePointer + playerOffset, theId)
    local actionStruct := ReadMemory(playerPointer + playerActionStructOffset, theId)

    local xCoord := ReadMemory(playerPointer + playerXposOffset, theId)
    local yCoord := ReadMemory(playerPointer + playerYposOffset, theId)
    local zCoord := ReadMemory(playerPointer + playerZposOffset, theId)
    
    SetFormat, IntegerFast, hex    
    
    local yCoordFloat := hextofloat(yCoord+0)
    
    ;tolog = yCoordFloat : %yCoordFloat%
    ;    logThis(toLog, "")
    
    SetFormat, IntegerFast, d

    if(yCoordFloat < 600.0)
    {
        Loop %nTimes%
        {
            MoveTo(floattohex(hextofloat(xCoord) - 20.0), yCoord, zCoord, 0, theId, actionStruct, 60.0)
            sleep 1000
            MoveTo(xCoord, yCoord, floattohex(hextofloat(zCoord) - 20.0), 0, theId, actionStruct, 60.0)
            sleep 1000
            MoveTo(floattohex(hextofloat(xCoord) + 20.0), yCoord, zCoord, 0, theId, actionStruct, 60.0)
            sleep 1000
            MoveTo(xCoord, yCoord, floattohex(hextofloat(zCoord) + 20.0), 0, theId, actionStruct, 60.0)
            sleep 1000
        }
    }
}

logThis(toLog, playerName)
{
    global
    
    if(logActivities=1)
    {

    FileAppend,
    (
        `n%toLog%
    ), %playerName%.txt
    }

}





String2Hex(x)                 ; Convert a string to hex digits
{
   format = %A_FormatInteger%
   SetFormat Integer, H
   hex = X
   Loop Parse, x
   {
      y := ASC(A_LoopField)   ; 2 digit ASCII code of chars of x, 15 < y < 256
      StringTrimLeft y, y, 2  ; Remove leading 0x
      hex = %hex%%y%
   }
   SetFormat Integer, %format%
   Return hex
}

Hex2String(x)                 ; Convert a huge hex number starting with X to string
{
   Loop % StrLen(x)//2        ; 2-digit blocks, 1st digit at is pos 2, after X
   {
      StringMid hex, x, 2*A_Index, 2
      string := string . Chr("
0x" hex)
   }
   Return string
}


;----- Hash functions -----

Hash16(x)   ; 16-bit hash related to DJB2 hash(i) = 33*hash(i-1) + x[i]
{
   hash = 5381
   StringLen Len, x
   Loop %Len%
   {
      Transform y, ASC, %x%   ; ASCII code of 1st char
      hash := 33*hash + y                ; *33 = <<5,add
      hash := hash >> 16 ^ hash & 0xFFFF ; Fold over MS & LS word
      StringTrimLeft x, x, 1  ; Remove 1st char from x
   }
   Return hash
}

ReadMemory2(MADDRESS=0,PROGRAM="", size=4, retType="
UInt*")
{
    winget, pid, PID, %PROGRAM%
    tooltip, %PROGRAM% | %pid%
    sleep 1000
    ProcessHandle := DllCall("
OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt")
    DllCall("
ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,retType,MVALUE,"UInt",size,"UInt *",0)
    DllCall("
CloseHandle", "int", ProcessHandle)
    return MVALUE
}

ReadMemory(MADDRESS=0,PROGRAM="", size=4, retType="
UInt*")
{
   Static OLDPROC, ProcessHandle
   VarSetCapacity(MVALUE,size,0)                            ;Make a variable MVALUE with a capacity of 4 bytes
   If PROGRAM != %OLDPROC%                            ;If the program is not previously opened
   {
      WinGet, pid, pid, % OLDPROC := PROGRAM                    ;Get the program's process id
      ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("
CloseHandle"    ;
      ,"
UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"        ;Make sure the program is open
      ,"
Int",16,"Int",0,"UInt",pid) : 0)                    ;
   }
   If (ProcessHandle) && DllCall("
ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,retType,MVALUE,"UInt",size,"UInt *",0)
       return MVALUE ;return *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
   return !ProcessHandle ? "
Handle Closed" closed : "Fail"
}

WriteMemory(WVALUE,MADDRESS,PROGRAM, size=4)
{
    winget, pid, PID, %PROGRAM%

    ProcessHandle := DllCall("
OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt")
    DllCall("
WriteProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "Uint*", WVALUE, "Uint", size, "Uint *", 0)

    DllCall("
CloseHandle", "int", ProcessHandle)
    return
}




dec2hex(n) {

    SetFormat, IntegerFast, hex
    n += 0  ; Sets Var (which previously contained 11) to be 0xb.
    n .= ""  ; Necessary due to the "
fast" mode.
    SetFormat, IntegerFast, d

   ;oIF := A_FormatInteger
   ;SetFormat,Integer, hex
   ;n := StrLen(n+0) ? n+0 : n
   ;n .= ""
   ;SetFormat,Integer, % oIF
   ;return n
}

hex2dec(n) {
   x := ((substr(n,1,2)!="
0x") ? "0x" : "") n
   if ! StrLen(x+0)
      return n
   oIF := A_FormatInteger
   SetFormat,Integer, d
   x += 0
   SetFormat,Integer, % oIF
   return x
}


HexToFloat(d) {
      Return (1-2*(d>>31)) * (2**((d>>23 & 255)-127)) * (1+(d & 8388607)/8388608) ; 2**23
}

Txt2Hex(Txt) {
format := A_FormatInteger
StringSplit, TxtArray, Txt
loop, %TxtArray0%
   {
   CurrentTxt := TxtArray%A_Index%
   blah := Asc(CurrentTxt)
   SetFormat, Integer, Hex
   Hex := Asc(CurrentTxt)
   SetFormat, Integer, Decimal
   StringReplace, Hex, Hex, 0x,,All
   If StrLen(Hex) = 1
      {
      Hex := Hex . "
0"
      }
   Hex%A_Index% := Hex
   }
Hex=
Loop, %TxtArray0%
   {
   Hex := Hex . Hex%A_Index%
   }
SetFormat, Integer, %Format%
return %Hex%
}

Hex2Txt(Hex) {
format := A_FormatInteger
go=1
Txt=
HexLen := StrLen(Hex)
Loop, %HexLen%
   {
   If go=1
   {
   go=0
   HexSet := "
0x" . SubStr(Hex, A_Index, 2)
   SetFormat, Integer, Decimal
   HexSet += 0
   Txt := Txt . Chr(HexSet)
   }
   else
   {
   go=1
   }
   }
SetFormat, Integer, %Format%
return %Txt%
}

HexToDouble(x) { ; may be wrong at extreme values
   Return (2*(x>0)-1) * (2**((x>>52 & 0x7FF)-1075)) * (0x10000000000000 | x & 0xFFFFFFFFFFFFF)
}

FloatToHex(f) {
   form := A_FormatInteger
   SetFormat Integer, HEX
   v := DllCall("
MulDiv", Float,f, Int,1, Int,1, UInt)
   SetFormat Integer, %form%
   Return v


Offsets file is juste above. I prefer waiting for confirmation it works before posting a zip file with all in it. This should prevent noobs of worst type to grab a maybe bugged version and dispell it around the net .
AlainProvist is offline  
Thanks
2 Users
Old 11/23/2012, 21:02   #362
 
elite*gold: 0
Join Date: Nov 2012
Posts: 96
Received Thanks: 81
I just scroll down the Source Code for interest and see this Line:
Quote:
;DllCall("VirtualFreeEx", "Uint", ProcessHandle, "Uint", packetAddress, "Uint", 0, "Uint", 0x8000)
Why dont you Free the Memory and allocate it on every Function call again ?
Mean to remember me that this will crash the Game after a couple of Runs.

Then you dont close the open Handle after the Function:
Quote:
;DllCall( "CloseHandle", UInt,ProcessHandle )
But open it again on every call of the Function, would it not be better to open booth only once and free/close them on Program Exit ?
Murmuring is offline  
Old 11/23/2012, 22:58   #363
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
To be honest with you I didn't watch at all this part of the code since it was apparently doing its job. I had never used ahk language and I admit I learned from scratch with this code.

Logically I would say you're right. I don't know why it has been commented but guess it has a right purpose... From what I know, this app never crashed anything except when I quit the game while the app is still running.


Patch 1 : fix NPC 32 to 35
add this
PHP Code:
xCoord27988to27993Extra    :=    xCoord0to27993Extra := 1149833800
yCoord27988to27993Extra    
:=    yCoord0to27993Extra    :=    1129694932
zCoord27988to27993Extra    
:=    zCoord0to27993Extra    :=    3311194131 
AlainProvist is offline  
Thanks
1 User
Old 11/24/2012, 00:13   #364
 
elite*gold: 0
Join Date: Dec 2010
Posts: 55
Received Thanks: 11
.
Y4kuzi is offline  
Old 11/24/2012, 01:12   #365
 
elite*gold: 0
Join Date: Nov 2012
Posts: 96
Received Thanks: 81
Quote:
Originally Posted by AlainProvist View Post
Logically I would say you're right. I don't know why it has been commented but guess it has a right purpose... From what I know, this app never crashed anything except when I quit the game while the app is still running.[/php]
Ah Ok, maybe the original Programmer found his Way back here and can say something about this :-)

I think i give this Tool a try, wen im done with Assasins Creed 3
Murmuring is offline  
Old 11/24/2012, 01:34   #366
 
elite*gold: 0
Join Date: Nov 2012
Posts: 2
Received Thanks: 0
^_^

PHP Code:
PHP Code:
xCoord27988to27993Extra    :=    xCoord0to27993Extra := 1149833800 
yCoord27988to27993Extra    
:=    yCoord0to27993Extra    :=    1129694932 
zCoord27988to27993Extra    
:=    zCoord0to27993Extra    :=    3311194131 
please wait 2 seconds for an uncompressed image, or press Ctrl+F5 for original quality page
elena187 is offline  
Old 11/24/2012, 04:21   #367
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
Quote:
Originally Posted by Y4kuzi View Post
Lol with this script my character is flying circles to the left while flying up xD
Is this on purpose? :P

Great work Alain ^^
Yep cause I can't manage to make the original flyup function works again with the last expansion... seems the position after flying up is reverted back by the serveur. The only way I found to fly up was to used the flyto function that basically use autopilot. So I need to move horizontally if I want to go up, and that is why I chose to do a fly circle movement to stay nearby while going up . Looks probably odd but it does the job .
AlainProvist is offline  
Thanks
1 User
Old 11/24/2012, 05:04   #368
 
elite*gold: 0
Join Date: Dec 2010
Posts: 55
Received Thanks: 11
.
Y4kuzi is offline  
Old 11/25/2012, 04:28   #369
 
elite*gold: 0
Join Date: Dec 2011
Posts: 7
Received Thanks: 0
Hi guys,
I've been a fan of your work for the past year, using FlyWQ and loving it.
Unfortunately I have no programming skills and don't know where to start to change FlyWQ to get it to work with the latest revisions.
I've looked at IDA and it made my brain melt.
Can someone please give me some tips on how to get FlyWQ working again?
Alternatively, if it's not rude to ask, does someone have a working version of it they wouldn't mind sharing?
Thanks in advance
jeff2012 is offline  
Old 11/25/2012, 06:14   #370
 
elite*gold: 0
Join Date: Dec 2010
Posts: 55
Received Thanks: 11
.
Y4kuzi is offline  
Thanks
1 User
Old 11/25/2012, 10:37   #371
 
elite*gold: 0
Join Date: Dec 2011
Posts: 7
Received Thanks: 0
Many thanks Y4kuzi, working brilliantly once again - I love the twirling ascent too!

Thanks also to AlainProvist for work in figuring the script!
jeff2012 is offline  
Old 11/25/2012, 10:52   #372
 
elite*gold: 0
Join Date: Aug 2008
Posts: 41
Received Thanks: 3
I have tried 3 hours to make it working but it still not running, have downloaded the autohotkey prog and have several times copy past the prog script and try to run it but dont do any thing prob i do something wrong.
Al i get is that old WQ window which u can choose which char u wanne do wq but no names is in that window.
santaclaus62 is offline  
Thanks
1 User
Old 11/25/2012, 16:46   #373
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 562
You probably missed to change the WQ.ini provided some posts above. these offsets are for pwi only.

Since noone seemed to have bugs with it I provide now the full zip. I named it FlyWQ 3.1 since I found some times ago on the net a 3.0 version with no source code and trojan inside. So just to prevent ppl for being misleaded and be infected by this ****, I prefer use 3.1 .
Attached Files
File Type: rar FlyWQ 3.1.rar (218.7 KB, 628 views)
AlainProvist is offline  
Thanks
5 Users
Old 11/25/2012, 18:57   #374
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
As the original 'programmer' I just want to apologize for the bad quality of the code. I'm still amazed that people seem to keep the script working

I might have a look as to why the moving up is no longer working, but then again it seems people have solved it.

edit: Also wouldn't have a clue as to why I commented certaint hings out as it's been ages since I wrote that and really haven't done anything with pwi for quite a while.
Interest07 is offline  
Thanks
2 Users
Old 11/25/2012, 21:56   #375
 
elite*gold: 0
Join Date: Oct 2010
Posts: 555
Received Thanks: 163
Thank you very much to everybody who keep the Bot up to work. I added now the new links (new working bot from AlainProvist and new offsets from msxgames. Thank you very much) to the treasure map to informations

I keeped the link to the Bot Version 2.9 that Msxgames wrote because this bot work for all PW Versions till Perfect World Version 1.4.5

Quote:
I have tried 3 hours to make it working but it still not running, have downloaded the autohotkey prog and have several times copy past the prog script and try to run it but dont do any thing prob i do something wrong.
Al i get is that old WQ window which u can choose which char u wanne do wq but no names is in that window.
I had the same problem too. I tried it, had the correct offsets and started them as administrator, but no names are shown. Just the WQ Bot window. The problem was the wrong base file.bin informations when compiling. You must choose 1.1.9.0 ANSI 32 Bit then it should work. (it work for me) don't forget to run the bot as Administrator and to have the correct offsets.

Attached is the ahk2exe program that I have from the Internet.
Attached Files
File Type: zip Ahk2Exe.zip (58.3 KB, 91 views)
martmor is offline  
Reply




All times are GMT +1. The time now is 13:09.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.