Party Tränke Bot

01/02/2010 15:51 khios#16
Ok I found some code on the "internet"

Code:
Global $FrostyTonicModel = 30648   ;Frosttränke
Global $YuletideTonicModel = 21490 ;Weihnachtstränke
Global $FruitCakesModel = 21492    ;Früchtebrot
Global $SnowMannModel = 6376       ;Schneemann-Macher
Global $Squash_SerumModel = 6369   ;Kürbisserum
Global $GiftsModel = 21491         ;Wintertags-Geschenke
Global $Gost_In_Da_BoxModel = 6368 ;Schachtelgeister
Global $ToT_BagsModel = 28434      ;Süßes-oder-Saures Taschen
Global $ChocoBunniesModel = 22644  ;Schokoladhasen
 
#include <GWCAConstants.au3>
#include <NomadMemory.au3>
 
Global $Name = "Guild Wars"         ;GW Name eintragen
Global $Tonic = true                ;True/False Trank oder nich
Global $DistNrMem = 0xa165dc        ;Distrikt Nummer
Global $Model = $FrostyTonicModel   ;Model eintragen
 
Global $sGW = $Name
Global $hwnd = WinGetHandle($Name)
Global $PID = WinGetProcess($hwnd)
Global $hprocess = _MemoryOpen($PID)
 
Opt("WinTitleMatchMode", 3)
Opt("TrayIconDebug", 1)
 
$cGUI = GUICreate("GWCA " & $Name)
GUIRegisterMsg(0x500, "WndCallback")
 
Dim $Paused
$EngineHook = "OFF"
HotKeySet("{pause}", "Pause")
HotKeySet("{end}", "Exitit")
HotKeySet("{INSERT}", "AutoChangeEngineMode")
 
While 1
        $ID = CmdCb($CA_FindItemByModelId, $Model)
        $ID = $ID[0]
        If $ID = 0 Then Exitit()
        If $Tonic = True Then
                For $i = 1 To 2
                        cmd($CA_UseItemById, $ID)
                        Sleep(20)
                Next
                Sleep(100)
                RandomChangeDis()
                TravelSlp()
        Else
                cmd($CA_UseItemById, $ID)
                Sleep(100)
        EndIf
WEnd
 
Func RandomChangeDis()
        Do
                If Random(1, 4, 1) <> 4 Then
                        $NewDis = Random(1, 5, 1)
                        If $NewDis = 1 Then $NewDis = 0
                Else
                        $NewDis = Random(9, 10, 1)
                EndIf
        Until ReadDisNr() <> $NewDis
        Cmd($CA_CHANGEDISTRICT, 2, $NewDis)
EndFunc   ;==>RandomChangeDis
 
Func ReadDisNr()
        Return _MemoryRead($DistNrMem, $hprocess)
EndFunc   ;==>ReadDisNr
 
Func GetMapLoading()
        $Loading = CmdCb($CA_GetMapLoading)
        Return $Loading[0]
EndFunc   ;==>GetMapLoading
 
Func TravelSlp()
        $travelslp = TimerInit()
        While GetMapLoading() <> 2
                Sleep(100)
                If TimerDiff($travelslp) > 10000 Then ExitLoop
        WEnd
        While GetMapLoading() = 2
                Sleep(100)
                If TimerDiff($travelslp) > 10000 Then ExitLoop
        WEnd
        Sleep(2500)
EndFunc   ;==>TravelSlp
 
Func AutoChangeEngineMode()
        Select
                Case StringUpper($EngineHook) = "ON"
                        Cmd($CA_SETENGINEHOOK, 0)
                        Global $EngineHook = "OFF"
                Case Else
                        Cmd($CA_SETENGINEHOOK, 1)
                        Global $EngineHook = "ON"
        EndSelect
EndFunc   ;==>AutoChangeEngineMode
 
Func _Tooltip($Text, $x = "Standard", $y = "Standard")
        $size = WinGetPos($hwnd)
        Select
                Case $x = "Standard"
                        $x = $size[0]
        EndSelect
        Select
                Case $y = "Standard"
                        $y = $size[1]
        EndSelect
        ToolTip($Text, $x, $y)
EndFunc   ;==>_Tooltip
Func Pause()
        $Paused = Not $Paused
        While $Paused
                Sleep(100)
                _Tooltip("Script is Paused!")
        WEnd
        _Tooltip("")
EndFunc   ;==>Pause
Func Exitit()
        Cmd($CA_SETENGINEHOOK, 0)
        Exit
EndFunc   ;==>Exitit
Just change the type of tonic/gift/what ever you want! Here
Code:
Global $Model = $FrostyTonicModel   ;Model eintragen
Refer to the Global Tonics variable at the top of the script:)
01/02/2010 16:00 ddl#17
hey thats an old code by me

you have to change more

Code:
Global $Name = "Guild Wars"         ;Guild Wars Window Name
Global $Tonic = true                ;If it´s a tonic or not
Global $DistNrMem = 0xa165dc        ;the district number mem
Global $Model = $FrostyTonicModel   ;the model of the item to be used
01/03/2010 01:36 khios#18
Quote:
Originally Posted by DDL View Post
hey thats an old code by me

you have to change more

Code:
Global $Name = "Guild Wars"         ;Guild Wars Window Name
Global $Tonic = true                ;If it´s a tonic or not
Global $DistNrMem = 0xa165dc        ;the district number mem
Global $Model = $FrostyTonicModel   ;the model of the item to be used
I've made the changes for yuletide tonics and wintersday gifts!

Thank You verry much got my Party Animal title in 1 day :) Thx to Snowball Domina bot too :D
01/03/2010 14:40 fu25fps#19
wie bekomm ich den die Mem adresse aus :)
01/03/2010 14:52 Garry goes Sheep#20
Quote:
Originally Posted by fu25fps View Post
wie bekomm ich den die Mem adresse aus :)
mem sammelthread.
01/03/2010 15:06 kewl story#21
Quote:
Originally Posted by h3llh0und0815 View Post
Das funzt bei mir irgendwie nicht. Bei der eingabe der DistNrMem Adresse beendet sich der bot...was mach ich falsch?
Bei mir auch Iwelche Idee warum? ;)
01/03/2010 15:07 Garry goes Sheep#22
Richtige mem eingeben. Findest du im mem sammelthread...
01/03/2010 15:09 ddl#23
oder so ne graphics.dll im gw ordner haben