Jump to content

Recommended Posts

Posted

Awesome work bro, with this technique it is possible to develope a intelegent bot which would rock :)

Question: You still didn't find out how to differentiate between mobs, npc, and players?

Greetz,

Zephir

  • Replies 470
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

Well grats malu05.

Been abroad for business and now im back.

Technically you have everything you need to actually make a totally independent automaton that interacts with its suroundings.

Now you have the easy part :). Writing a couple of tons of code. hehe

Kinda sweet seeing it done with AutoIT :)

I did some smal work on the pathfinding and today i was thinking to load your Automaton and see what can be done.

Can you hint me on the NPC location scanner ... a smal, very tiny hint :)

BR

/Periklis

.

Posted

Can you hint me on the NPC location scanner ... a smal, very tiny hint :)

Scrap that.

I read the code. I hinted myself ... well im lazy sometimes.

BR

/Periklis

.

Posted

Elaborating now since im not an ace on AutoIT.

If id like to add behaviour routines to the bot ...

A. Do i put it in the Main bot code?

B. Create separate script files for that ? Ex. Combat.au3, Environment.au3 ... and include them to malu's script.

Another thing i was thinking off here was event driven behaviour.

These can be caught from WoW and be presented like colored pixels as in the original BOT.

Automaton is fighting mob.

Another mob appears. (Event triggers)
    Check parameters (Health, Mana)
        if(within acceptable levels)
            Engage Add. (dots, fear, whatever)
        else
            Kill current target
            If(CanHeal)
                Heal Self
                Engage Add
            else
                Run Away
            end If
        end if

Going to get a Lotro copy to work on that :) Virgin ground :)

BR

/Periklis

.

Posted

Elaborating now since im not an ace on AutoIT.

If id like to add behaviour routines to the bot ...

A. Do i put it in the Main bot code?

B. Create separate script files for that ? Ex. Combat.au3, Environment.au3 ... and include them to malu's script.

Another thing i was thinking off here was event driven behaviour.

These can be caught from WoW and be presented like colored pixels as in the original BOT.

Automaton is fighting mob.

Another mob appears. (Event triggers)
    Check parameters (Health, Mana)
        if(within acceptable levels)
            Engage Add. (dots, fear, whatever)
        else
            Kill current target
            If(CanHeal)
                Heal Self
                Engage Add
            else
                Run Away
            end If
        end if

Going to get a Lotro copy to work on that :) Virgin ground :)

BR

/Periklis

.

I think it would be good to keep things seperate.

I will rewrite Thermo Prime too to seperate some of the movement code in to seperate "UDF's".

This will also make it possible for other people to make bots using the Thermo UDF so people don't have to "copy/paste" all the code out of the main code but just add the "UDF's" they want.

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted

I think it would be good to keep things seperate.

I will rewrite Thermo Prime too to seperate some of the movement code in to seperate "UDF's".

This will also make it possible for other people to make bots using the Thermo UDF so people don't have to "copy/paste" all the code out of the main code but just add the "UDF's" they want.

very nice.

BR

/P

.

Posted

Awesome work bro, with this technique it is possible to develope a intelegent bot which would rock :)

Question: You still didn't find out how to differentiate between mobs, npc, and players?

Greetz,

Zephir

Hehe... well thats a matter of time...

Each object have 1788 bytes of data... lets say i know about 30 of thoes...

The rest is just lookup -> watch over time -> if known, document else leave for now....

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted (edited)

I think it would be good to keep things seperate.

I will rewrite Thermo Prime too to seperate some of the movement code in to seperate "UDF's".

This will also make it possible for other people to make bots using the Thermo UDF so people don't have to "copy/paste" all the code out of the main code but just add the "UDF's" they want.

I took your code for thermo prime and rewrote it into UDFs. I dont intend to offend you but i do not quite like your way of writing your scripts^^. It takes me some time to get into those... a little messy :). Thus I take your ideas and redo them... The rest of your work is simply briliant!!!

If anyone is interessted i can post those... would have to change some things since i made those in german :)

Edited by Zephir
Posted

I took your code for thermo prime and rewrote it into UDFs. I dont intend to offend you but i do not quite like your way of writing your scripts^^. It takes me some time to get into those... a little messy :). Thus I take your ideas and redo them... The rest of your work is simply briliant!!!

If anyone is interessted i can post those... would have to change some things since i made those in german :)

HEHE.. yhea... i got my own personal style...

Usually im kinda fustrated over some of my own scripts too..

I think i have to take a look at some "pro" scripts to get some ideas on how to handle a good structure.

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted

it's quite simple:

work with functions!My bot is built like this:

Main file:

#include <some_funcs.au3>

while 1
sleep(100)
wend

Func cmd()
    Switch $cmd
    Case 0 ;record wps
        gatherData()
        saveWP($wpmode)
    Case 1 ; read and  walk
        gatherData()
        sleep(10)
        ;closestWP()
        readWP($wpmode)
        sleep(10)
        rotateBot()
        sleep(10)
        runBot()
    Case 2 ; battle
        combat()
    Case 3 ;port battle
        lootmode()
    Case 4 ; inventory full
        sellmode()
    Case 8
        ;dead()
    EndSwitch
EndFunc

Then there is a function "statuscheck" that is called every 2 seconds to check whether character is in combat or not, how much hp are left etc. That function also changes the $cmd variable and calls cmd(). The functions you see in the table are stored in a separate file. This might not be the best way of doing it but many poeple told me that i work very comprehendable ....

Posted (edited)

Hehe... well thats a matter of time...

Each object have 1788 bytes of data... lets say i know about 30 of thoes...

The rest is just lookup -> watch over time -> if known, document else leave for now....

could you provide such a 1788 byte object? just to look at it. Or tell me please how to get there ... :)

There must be a name of the mob stored somewhere. This would allow people to hunt only a certain kind of monster.

EDIT: Grammar ^^

Edited by Zephir
Posted

HEHE.. yhea... i got my own personal style...

Usually im kinda fustrated over some of my own scripts too..

I think i have to take a look at some "pro" scripts to get some ideas on how to handle a good structure.

LOL i didn't say that first ... but if you were working in my programming team we two would surely have some serious discussions in my room :)

This is not a flame ... hehe.

Some advice.

Distinguish between constants and variables ... and move constants out of main code, like $knownX and $startsearchX which i suspect to be constants.

give prefixes to variables ... string can start with $str, integer or double/float with $int respectively $dbl/$float.

dont be shy with looooong variable names. And tons off commenting.

Once again this is not criticism ... it's friendly advice. Because i bet you 100 $ that if you go back to your own script after 3-4 months you will have problems remembering what you programmed ... trust me ... been there :)

BR

/P

.

Posted (edited)

could you provide such a 1788 byte object? just to look at it. Or tell me please how to get there ... :)

There must be a name of the mob stored somewhere. This would allow people to hunt only a certain kind of monster.

EDIT: Grammar ^^

Well since im going to my girldfriend this intire weekend i think i should give you the code.

It is however a very early version, and "not" ready for release since it doesnt always work as intended, but try it out.

  • -Login on your char and make sure that there are mobs around you (else it wont work)
  • -Run the script.
  • -If the scan takes longer than 10sec close the script and open it again... if this doesnt help try relog.
  • -When the scan succed you will get a list of all objects near by, their X,Y and Z position, rotation and HP in %.
  • -Objects are not only mobs and NPC but also objects loaded from the server, like mailboxes etc.
In the buttom you will see "Base Array:"

Open your Memory Scanner (like CheatEngine or Debug apps) and add this adress manually.

You can then browse the memory region 1788 bytes down where the next mob apears.

This gives you the 1788 byte of info you wanted.

The rescan function (F2) seem to mess around with the mob numbers but it should work...

; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
;
; Author:
;   Malu05 aka. Mads Hagbart Lund <Batmazbaz@hotmail.com>
;
; Script Function:
;   World Of Warcraft - Memory Location Scanner (Mob Edition
; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
;;================================================================================
;;Includes;
;;================================================================================
#include <NomadMemory.au3>
#include <GUIConstants.au3>
#include <String.au3>
#include <Date.au3>
#include <array.au3>
#Include <Misc.au3>
HotkeySet("{F2}","rescan")
HotkeySet("{ESC}","terminate")
;;================================================================================
;;Config Variable Definition;
;;================================================================================
$UpdateSpeed = 1 ;Defines the update speed in milliseconds.
;;================================================================================
;;Variable Definition;
;;================================================================================
dim $mobcount, $Listammount = 0
Dim $datafoundX, $scanok = 0
Dim $Finalrot, $Finallocx,$Finallocy,$Finalrot
dim $value = 0x010000
dim $StartMemory = 0x00400000
dim $memoryX= 0
dim $processfound = 0
dim $appname = "WOW Mem Scanner2"
Global $defaultstatus = "Ready"
dim $scanprocess = 0
dim $transyn = 0
dim $Datainput[6]
dim $mobdata[400], $dataok[400]
;;================================================================================
;;Process front
;;================================================================================
Opt("WinTitleMatchMode", -1)
SetPrivilege("SeDebugPrivilege", 1)
Global $ProcessID = WinGetProcess("world of warcraft","")
Local $DllInformation = _MemoryOpen($ProcessID)
If @Error Then
    MsgBox(4096, "ERROR", "Failed to open memory for process;" & $ProcessID)
    Exit
EndIf
;;================================================================================
;;GUI Creation
;;================================================================================
GUICreate($appname, 530, 770)
$EndMemory = 0x007CF440
$scanok = 1
GUICtrlCreateLabel($appname & " by Malu05", 0, 0, 530, 30,BitOr($SS_CENTER ,$SS_SUNKEN))
$statuslabel = GUICtrlCreateLabel ($defaultstatus,0,755,530,15,BitOr($SS_SIMPLE,$SS_SUNKEN))
;Numbers
;x
$listview = GUICtrlCreateListView ("Nr  |Xpos   |Ypos   |Zpos   |Rot    |Hp      | Level    |BaseAdress   ",5,35,520,660);,$LVS_SORTDESCENDING)
GUICtrlCreateLabel("Base Array:", 5, 735, 85, 20,$SS_right)
$Basevaluepointer = GUICtrlCreateLabel("Not found", 100, 736, 55, 15)
GUICtrlCreateLabel("Objects:", 5, 715, 85, 20,$SS_right)
$MobCountDisplay = GUICtrlCreateLabel("0", 100, 716, 55, 15)
GUICtrlCreateLabel("", 0, 710, 530, 3,BitOr($SS_CENTER ,$SS_SUNKEN))
$ontop= GUICtrlCreateCheckbox ("On Top", 290, 735, 60, 18)
$trans= GUICtrlCreateCheckbox ("Transparent", 355, 735, 80, 18)
GUISetState()
TrayTip($appname, "Scanning For Base Array Pointer", 5, 1)
for $i=0 to 5 step + 1
$Datainput[$i] = $EndMemory + $i
Next
ConsoleWrite(hex(_MemoryRead( 0x18710008, $DllInformation, 'int')))
;;================================================================================
;;Pointer Scanner
;;================================================================================
;X Pointer
GUICtrlSetData($Basevaluepointer,"Scanning...")
GUICtrlSetData($statuslabel,"Base Array Pointer")
$begin = TimerInit()
$valueSS = _MemoryRead($StartMemory , $DllInformation, 'float')
while hex($EndMemory) <> $valueSS
$StartMemory = $StartMemory+$value
$valueSS = hex(_MemoryRead( $StartMemory+0x8, $DllInformation, 'int'))
;if $StartMemory > 0x18700000 then ConsoleWrite(" " & hex($StartMemory+0x8) & " " & $valueSS)
WEnd
$dif = TimerDiff($begin)
TrayTip($appname, "Base Array Pointer Found in "& (floor($dif)/1000) & " Seconds", 5, 1)
GUICtrlSetData($Basevaluepointer,hex($StartMemory))
$memoryX = "0x" & hex($StartMemory,8)
GUICtrlSetData($statuslabel,"Ready. Time = " & (floor($dif)/1000)& " Seconds")
Mainloop()
func Mainloop()
while 1
    Opt("WinTitleMatchMode", 2)
    ;Memscan()
    Arraymanagement()
    $scanprocess = 0
    if GUICtrlRead($trans) = 4 Then
        if $transyn = 1 Then
            WinSetTrans( $appname, $appname, 255)
            $transyn = 0
        EndIf
    Else
        if $transyn = 0 Then
            WinSetTrans( $appname, $appname, 200)
            $transyn = 1
        EndIf
    EndIf   
    if GUICtrlRead($ontop) = 1 Then
        WinSetOnTop($appname, "", 1)
    Else
        WinSetOnTop($appname, "", 0)
    EndIf
    sleep($UpdateSpeed)
;nothing
WEnd
EndFunc
;;================================================================================
;;Array Management
;;================================================================================
func Arraymanagement()
If $scanok = 1 then
$mobcount = -1
$searchAdress = $StartMemory + 0x8
$Extcho = _MemoryRead( $searchAdress, $DllInformation, 'int')
while $Extcho > 0x00
    $mobcount = $mobcount + 1
    $searchAdress = $searchAdress + 0x001788
    $Extcho = _MemoryRead( $searchAdress, $DllInformation, 'int')
WEnd

$KnownX = $StartMemory+0xB88
for $i = 0 to $mobcount step +1
    if $dataok[$i] = "ok" then
        ;nothing
    Else        
        $mobdata[$i]=GuiCtrlCreateListViewItem($i &"|" & (_MemoryRead( $KnownX, $DllInformation, 'float')),$listview)
        $dataok[$i] = "ok"
        $Listammount = $Listammount + 1
    EndIf
    GUICtrlSetData($mobdata[$i],$i &"|" & floor(_MemoryRead( $KnownX, $DllInformation, 'float')) & "|" & floor(_MemoryRead( $KnownX + 0x4, $DllInformation, 'float')) & "|"& floor(_MemoryRead( $KnownX + 0x8, $DllInformation, 'float')) & "|"& floor((_MemoryRead( $KnownX + 0xC, $DllInformation, 'float') / (3.14159265358979/180))) & "|"& _MemoryRead( $KnownX + 0x5c0, $DllInformation, 'int') &"|"& _MemoryRead( $KnownX + 0x5F0, $DllInformation, 'int') &"|"& hex($KnownX) & "|")
    $KnownX = $KnownX + 0x1788
Next
For $i = $mobcount to $Listammount step + 1
    GUICtrlDelete($mobdata[$i+1])
    $Listammount = $Listammount - 1
Next
GUICtrlSetData($MobCountDisplay,$mobcount)
EndIf
Return
EndFunc
;;================================================================================
;;Memscan
;;================================================================================
Func Memscan()
;GUICtrlSetData($Xvalue,floor(_MemoryRead($StartMemory, $DllInformation, 'float')))
;GUICtrlSetData($Yvalue,floor(_MemoryRead($startsearchY, $DllInformation, 'float')))
;GUICtrlSetData($Zvalue,floor(_MemoryRead($startsearchZ, $DllInformation, 'float')))
;GUICtrlSetData($Rotvalue,floor((_MemoryRead($startsearchRot, $DllInformation, 'float') / (3.14159265358979/180))))
sleep($UpdateSpeed)
Return
EndFunc
;;================================================================================
;;Rescan
;;================================================================================
func Rescan()
$scanok = 0
For $i = 0 to $Listammount+1 step + 1
GUICtrlDelete($mobdata[$i])
$dataok[$i] = ""
$Listammount = $Listammount - 1
Next
dim $StartMemory = 0x00400000
GUICtrlSetData($Basevaluepointer,"Scanning...")
GUICtrlSetData($statuslabel,"Base Array Pointer")
$begin = TimerInit()
$valueSS = _MemoryRead($StartMemory , $DllInformation, 'float')
while hex($EndMemory) <> $valueSS
$StartMemory = $StartMemory+$value
$valueSS = hex(_MemoryRead( $StartMemory+0x8, $DllInformation, 'int'))
;if $StartMemory > 0x18700000 then ConsoleWrite(" " & hex($StartMemory+0x8) & " " & $valueSS)
WEnd
$dif = TimerDiff($begin)
TrayTip($appname, "Base Array Pointer Found in "& (floor($dif)/1000) & " Seconds", 5, 1)
GUICtrlSetData($Basevaluepointer,hex($StartMemory))
$memoryX = "0x" & hex($StartMemory,8)
GUICtrlSetData($statuslabel,"Ready. Time = " & (floor($dif)/1000)& " Seconds")
$scanok = 1
sleep(500)
Return
EndFunc
;;================================================================================
;;Terminate
;;================================================================================
func terminate()
_MemoryClose($DllInformation)
exit 0
EndFunc ;==>TerminateoÝ÷ Ú) Ûiÿø¦ovf zÈZrK¬þ) ÛÝ¿ë

Again... not ready for release and have some unused functions in it that just... loops... but... tech-demo you know...

Edited by malu05

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted

Once again this is not criticism ... it's friendly advice. Because i bet you 100 $ that if you go back to your own script after 3-4 months you will have problems remembering what you programmed ... trust me ... been there :)

HAHA... Been there done that... a MILLION times!

Its awfull... like "WTF is that, and why the hell did i put it there...?"

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted

i like the way everything is going to grow here.

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Posted

There is possibly alot of interesting information in the block from hexMainOffset+hex00000564 to end.

I made a little memory dump program to get a dump from each memory location in the object array.

Here is a little section of the interesting block....

Since they are packet byte to byte some information is repeated but i didnt take my time to fix it.

000005BD - 1677721600   = Health Current
000005BE - 6553600  = Health Current
000005BF - 25600    = Health Current
000005C0 - 100      = Health Current
000005C1 - 0        = ?
000005C2 - 0        = ?
000005C3 - 0        = ?
000005C4 - 0        = ?
000005C5 - 0        = ?
000005C6 - 0        = ?
000005C7 - 0        = ?
000005C8 - 0        = ?
000005C9 - 1677721600   = Health Current
000005CA - 6553600  = Health Current
000005CB - 25600    = Health Current
000005CC - 100      = Health Current
000005CD - 0        = ?
000005CE - 0        = ?
000005CF - 0        = ?
000005D0 - 0        = ?
000005D1 - 1073741824   = ?
000005D2 - 1111490560   = ?
000005D3 - 256000000    = ?
000005D4 - 1000000  = ?
000005D5 - 1677725506   = Health Total
000005D6 - 6553615  = Health Total
000005D7 - 25600    = Health Total
000005D8 - 100      = Health Total
000005D9 - 0        = ?
000005DA - 0        = ?
000005DB - 0        = ?
000005DC - 0        = ?
000005DD - 0        = ?
000005DE - 0        = ?
000005DF - 0        = ?
000005E0 - 0        = ?
000005E1 - 1677721600   = Health Total
000005E2 - 6553600  = Health Total
000005E3 - 25600    = Health Total
000005E4 - 100      = Health Total
000005E5 - 0        = ?
000005E6 - 0        = ?
000005E7 - 0        = ?
000005E8 - 0        = ?
000005E9 - 1073741824   = ?
000005EA - 1111490560   = ?
000005EB - 256000000    = ?
000005EC - 1000000  = ?
000005ED - 301993794    = Object Level
000005EE - 1179663  = Object Level
000005EF - 4608     = Object Level
000005F0 - 18       = Object Level

This does give us the level of the object.

I have updated the scanner posten on previous page with that information.

It might help with gathering data.

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted

Im still not 100% sure how this set of data works.

I have never worked with arrays in memory before, and i feel kinda mislead.

Like this piece of data;

000005D5 - 1677725506
000005D6 - 6553615
000005D7 - 25600
000005D8 - 100

THe only thing i need there is the last due to the *256 of the rest.

And much of this array data is the same in 4 bytes.

But then i suddently get this;

00000620 - 33554432
00000621 - 131072
00000622 - 512
00000623 - 2  <---- ?? wtf
00000624 - 0

There i need the 0x623... but why is that so when like 95% of the data is based of the 4byte offsets?

Confused.... If anyone can aid me with this, i would love to hear about this matter.

Anyway, i have send a mail to a person who 100% sure know about most of the memory offsets.

Im not sure he will give me the exact data, but im sure some of his information will help me.

[center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center]

Posted (edited)

VERY NICE!

I'm really testy about using this. But I really want to.

So what are the chances of getting banned? Slim to none?

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...