Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 07:52

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

Advertisement



Malus_Bot für Naschkatzen Problem

Discussion on Malus_Bot für Naschkatzen Problem within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
Malus_Bot für Naschkatzen Problem

Also ich möchte einen kleinen Bot schreiben der sich tot-BiPt und dann automatisch eine Zuckerstage isst.

nun zum Problem,
Quote:
#include "GWCAConstants.au3"

Global $w1 = random(550,600)
Global $w2 = random(3000,3500)
$cbType = "float"

sleep(500)
WinWait("Guild Wars","")
If Not WinActive("Guild Wars","") Then WinActivate("Guild Wars","")
WinWaitActive("Guild Wars","")
sleep(500)

call ("Main")

func Main()
While 1
Sleep($w1)
cmd($CA_UseSkill ,1,22)
Sleep($w1)
cmd($CA_UseSkill ,1,22)
Sleep($w1)
cmd($CA_UseSkill ,1,22)
Sleep($w1)
cmd($CA_UseSkill ,1,22)
Sleep($w1)
cmd($CA_UseSkill ,1,22)
Sleep($w2)
cmd($CA_useitem,1,1)
Sleep($w1)
WEnd
EndFunc
1.sobald ich "cmd($CA_TargetNextPartyMember)" einfüge stürzt gw ab.
(denn ich habe das problem das sich die ID des helden von map zu map ändert, und der bot sollte für jedermann problemlos nutzbar sein)
2.ich hab schon 5mal BiP eingebaut weil er manchmal nicht alle castet und dann vorzeitig de zuckerstange essen will. ich wollte fragen ob es eine möglichkeit gibt den malus abzufragen frei nach dem motto " malus = 15 then cmd(CA_useitem ,1,1)
3.ich bin kein profi was scripten angeht deshalb sagt es mir ruhig wenn am aufbau schon fehle sind lerne gern dazu
4. würd auch gern ne dll autoinject einbauen weiss aber nicht wie
(#include <dllinjector.au3> ist klar aber es klappt nicht)
0ojako0 is offline  
Old 04/13/2010, 12:08   #2
 
Cr33p's Avatar
 
elite*gold: 0
The Black Market: 133/0/1
Join Date: Mar 2008
Posts: 820
Received Thanks: 156
zu 1.: wähle doch einfach den nächstbefindlichen verbündeten an: CA_TargetNextPartyMember
zu 2.: ich denke mal deine sleep Zeiten sind zu kurz. Erhöhe sie einfach oder schau dir mal CA_SkillRecharge an
zu 3.: Kannst es schon etwas eleganter schreiben. Vllt sowas in der Art:
PHP Code:
            $cbType "float"
Do 
cmd($CA_UseSkill ,1,22)
Sleep($w1)
CmdCB($CA_GetIsDead, -2)   ;castet bis er tot ist

until $cbVar
[0] = 0   ;jetzt ist er tot

Sleep
($w2)
cmd($CA_useitem,1,1
zu 4.:
PHP Code:
$hwnd WinGetHandle("Guild Wars")

Global Const 
$dllpath = @ScriptDir "\graphics.dll"
Global Const $dllname "graphics.dll"

If Not FileExists($dllpathThen
    MsgBox
(0x10"Error"$dllpath " Not found!")
    Exit
EndIf

$hMod GetModule($hwnd$dllname)
If 
$hMod 0 Then
    $iDLL 
InjectModule($hwnd$dllpath)
    If 
Not @error Then
        TrayTip
("""Injection Successfull"1)
    Else
        
MsgBox(0x10"Error in DLL Injection""Couldn't inject dll to " $hwnd & @CRLF "Code: " & @error)
    EndIf
Else
    
TrayTip(""$dllname " was already Injected: " $hMod1)
EndIf
        
Func GetModule($hWnd$ModuleName)

    
Local Const $MODULEENTRY32Struct DllStructCreate("dword dwsize;" _
            
"dword th32ModuleID;" _
            
"dword th32ProcessId;" _
            
"dword GlblcntUsage;" _
            
"dword ProccntUsage;" _
            
"dword modBaseAddr;" _
            
"dword modBaseSize;" _
            
"dword hModule;" _
            
"char szModule[256];" _
            
"char szExePath[260];")

    
Local $SnapShot DllCall("Kernel32.dll""hwnd""CreateToolhelp32Snapshot""dword"0x08"dword"WinGetProcess($hWnd))

    
DllStructSetData($MODULEENTRY32Struct"dwsize"DllStructGetSize($MODULEENTRY32Struct))

    
Local $State DllCall("Kernel32.dll""int""Module32First""hwnd"$SnapShot[0], "ptr"DllStructGetPtr($MODULEENTRY32Struct))

    Do
        
$ReadModule DllStructGetData($MODULEENTRY32Struct"szModule")
        If 
$ReadModule == $ModuleName Then Return "0x" & (Hex(DllStructGetData($MODULEENTRY32Struct'modBaseAddr')))
        
$State DllCall("Kernel32.dll""int""Module32Next""hwnd"$SnapShot[0], "ptr"DllStructGetPtr($MODULEENTRY32Struct))
        
Sleep(1)
    
Until Not $State[0]
    
DllCall("Kernel32.dll""int""CloseHandle""int"$SnapShot[0])
    
    Return 
0
EndFunc   
;==>GetModule

Func InjectModule
($hwnd$dllpath)
    If 
IsHWnd($hwnd) = 0 Then
        SetError
(-1)
        Return 
False
    
ElseIf StringLen($dllpath) <= Or StringRight($dllpath4) <> ".dll" Then
        SetError
(-2)
        Return 
False
    
EndIf

    
Local $pid$pHandle$pLibRemote$modHandle$LoadLibraryA$hThread

    Local $kernel32 
DllOpen("kernel32.dll")
    If 
$kernel32 = -1 Then
        
Exit
    EndIf

    
$pid DllCall("user32.dll""int""GetWindowThreadProcessId""hwnd"$hwnd"int*"0)
    If 
IsArray($pidThen
        $pid 
$pid[2]
    Else
        
SetError(-3)
        Return 
False
    
EndIf

    
$pHandle DllCall($kernel32"int""OpenProcess""int"0x1F0FFF"int"0"int"$pid)
    If 
IsArray($pHandle) And $pHandle[0] > 0 Then
        $pHandle 
$pHandle[0]
    Else
        
SetError(-4)
        Return 
False
    
EndIf

    
$pLibRemote DllCall($kernel32"int""VirtualAllocEx""int"$pHandle"short"0"int"0x1000"int"0x1000"int"4)
    If 
IsArray($pLibRemoteThen
        
If $pLibRemote[0] > 0 Then
            
;ConsoleWrite("0x" Hex($pLibRemote[0], 8) & @CR)
            
$pLibRemote $pLibRemote[0]
        Else
            
SetError(-5)
            Return 
False
        
EndIf
    Else
        
SetError(-6)
        Return 
False
    
EndIf

    For 
$i 0 To StringLen($dllpath)
        
$ret DllCall("kernel32.dll""int""WriteProcessMemory""int"$pHandle"int"$pLibRemote $i"int*"Asc(StringMid($dllpath$i 11)), "int"1"int"0)
        If 
IsArray($retThen
            
If $ret[0] = 0 Then
                SetError
(-7)
                Return 
False
            
EndIf
        Else
            
SetError(-8)
            Return 
False
        
EndIf
    
Next

    $modHandle 
DllCall($kernel32"long""GetModuleHandle""str""kernel32.dll")
    If 
IsArray($modHandleThen
        
If $modHandle[0] > 0 Then
            $modHandle 
$modHandle[0]
        Else
            
SetError(-9)
            Return 
False
        
EndIf
    Else
        
SetError(-10)
        Return 
False
    
EndIf

    
$LoadLibraryA DllCall($kernel32"long""GetProcAddress""long"$modHandle"str""LoadLibraryA")
    If 
IsArray($LoadLibraryAThen
        
If $LoadLibraryA[0] > 0 Then
            $LoadLibraryA 
$LoadLibraryA[0]
        Else
            
SetError(-11)
            Return 
False
        
EndIf
    Else
        
SetError(-12)
        Return 
False
    
EndIf

    
$hThread DllCall($kernel32"int""CreateRemoteThread""int"$pHandle"int"0"int"0"long"$LoadLibraryA"long"$pLibRemote"int"0"int"0)
    If 
IsArray($hThreadThen
        
;ConsoleWrite($hThread[0] & @CR)
        If 
$hThread[0] > 0 Then
            $hThread 
$hThread[0]
        Else
            
SetError(-13)
            Return 
False
        
EndIf
    Else
        
SetError(-14)
        Return 
False
    
EndIf

    
DllCall($kernel32"int""VirtualFreeEx""int"$pHandle"int"$pLibRemote"int"0x1000"int"0x8000)
    
DllCall($kernel32"int""CloseHandle""int"$hThread)
    
DllCall($kernel32"int""CloseHandle""int"$pHandle)

    
DllClose($kernel32)

    Return 
True

    
EndFunc   
;==>_InjectDll 
Cr33p is offline  
Thanks
1 User
Old 04/13/2010, 15:12   #3
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
erstmal danke bis hierher das geht schonmal ganz gut so ^^!
nur jetzt das prob das gw abstürtzt schwerwiegender fehler bericht an Anet senden !
und die dll muss ich immernoch manuel injekten obwohl einpopup sagt das es geklappt hat
und ich wollte den hero festflaggen weil wir sonst wegen dem rezz lagsam über die karte gleiten.
die coordinaten stimmen (mit msgbox gecheckt) aber der hero wird ans andere ende der weld geflaggt

hab auch schon cmdCB($CA_TargetNextPartyMember) probiert aber ist ja eigendlich auch schwachsinn ^^


PHP Code:
#include "GWCAConstants.au3"
#include "DLL_Include.au3"

#include "GWCAConstants.au3"
#include "DLL_Include.au3"

Global $w1 random(550,600)
Global 
$w2 random(3000,3500)
Global 
$target 22;cmdCB($CA_TargetNextPartyMember)

sleep(500)
WinWait("Guild Wars","")
If 
Not WinActive("Guild Wars",""Then WinActivate("Guild Wars","")
WinWaitActive("Guild Wars","")
sleep(500)


$CBType "float"
    
CmdCB($CA_GetCoords,-2)
    
Cmd($CA_CommandHero1,10+$CBVar[0],10+$CBVar[1])
    
MsgBox("","wert",""$CBVar[0] & " Und " $CBVar[1])


Do
cmd($CA_UseSkill ,1,$target)
Sleep($w1)
CmdCB($CA_GetIsDead, -2)   ;castet bis er tot ist

until $cbVar
[0] = 0   ;jetzt ist er tot

Sleep
($w2)
cmd($CA_useitem,1,1
0ojako0 is offline  
Old 04/13/2010, 17:43   #4
 
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
Code:
#include "GWCAConstants.au3"
#include "DLL_Include.au3"

Global $w1 = random(550,600)
Global $w2 = random(3000,3500)

sleep(500)
WinWait("Guild Wars","")
If Not WinActive("Guild Wars","") Then WinActivate("Guild Wars","")
WinWaitActive("Guild Wars","")
sleep(500)


$CBType = "float"
   CmdCB($CA_GetCoords,-2)
   Cmd($CA_CommandHero1,10+$CBVar[0],10+$CBVar[1])
    MsgBox("","wert",""& $CBVar[0] & " Und " & $CBVar[1])


Do
cmdCB($CA_TargetNextPartyMember)
cmd($CA_UseSkill ,1,-1)
Sleep($w1)
CmdCB($CA_GetIsDead, -2)   ;castet bis er tot ist

until $cbVar[0] = 0   ;jetzt ist er tot

Sleep($w2)
cmd($CA_useitem,1,1)
ddl is offline  
Old 04/13/2010, 22:29   #5
 
elite*gold: 0
Join Date: Jun 2009
Posts: 108
Received Thanks: 634
Gabber Nation is offline  
Thanks
5 Users
Old 04/14/2010, 07:01   #6
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
cmdCB($CA_TargetNextPartyMember) dieser befehl lässt gw abstürzen warum weiss ich nicht aber versucht es selbst vieleicht bin ich auch nur zu blöd.

und bei der dll injection klappt das auch nicht es steht zwar so da (unten rechts in der infoblase[Injection Successfull])aber gw ist nicht injectet.

und zum script vom anderen malus entferner
1. muss mann dort sein gw anpassen (fenster in die obere ecke z.b.)
2. kann man den bott weden auf mehreren accounts laufen lassen noch im hintergrund
3. hab ich spass am scripten und freu mich wenn ich auch mal was schaffe ^^
[wenn auch noch nicht ohne hilfe]
0ojako0 is offline  
Old 04/14/2010, 10:48   #7
 
Cr33p's Avatar
 
elite*gold: 0
The Black Market: 133/0/1
Join Date: Mar 2008
Posts: 820
Received Thanks: 156
Quote:
Originally Posted by 0ojako0 View Post
cmdCB($CA_TargetNextPartyMember) dieser befehl lässt gw abstürzen
Du musst es so schreiben:
cmd($CA_TargetNextPartyMember)
cmdCB brauchst du nur, wenn du einen Wert zurück bekommen willst, wie z.b. bei GetIsDead.
Cr33p is offline  
Old 04/14/2010, 11:03   #8
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
ups hab mich auch vertippt (hab den so aus DDL seinen script kopiert)
ich verwende nur cmd (CallBack brauch ich doch nur wenn ich variablen herrausholen will)
am bessten ist ihr testet das script mal und seht dann was bei euch passiert.
0ojako0 is offline  
Old 04/14/2010, 14:35   #9
 
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
So hab das MalusEntfern-Script auf die neuen Revs gebracht.
Stellt euch außerhalb mit nem Mesmer mit nem Wiederbelebungsskill hin und startet es.

Code:
#include "GWCAConstants.au3"

$wintergreen = 21488
$peppermint = 6370
$pumkin = 28433

$cbType = "int"
While 1
	Cmd($CA_TargetNearestAlly)
	sleep(1000)
	Do
		$HP = CmdCB($CA_GetHP,-2)
		Sleep(1000)
		UseSkillEx(1,-1)
	Until $HP[0] = 0
	Sleep(300)
	Do
		Sleep(1000)
		$HP = CmdCB($CA_GetHP,-2)
	Until $HP[0] > 0
	Sleep(500)
	$ID = CmdCB($CA_FindItemByModelId, $wintergreen)
	$ID = $ID[0]
	ConsoleWrite($ID&@CRLF)
	Sleep(100)
	If $ID <> 0 Then
		Cmd($CA_UseItemById , $ID)
	Else
		$ID = CmdCB($CA_FindItemByModelId, $peppermint)
		$ID = $ID[0]
		ConsoleWrite($ID&@CRLF)
		Sleep(100)
		If $ID <> 0 Then
			Cmd($CA_UseItemById , $ID)
		Else
			$ID = CmdCB($CA_FindItemByModelId, $pumkin)
			$ID = $ID[0]
			ConsoleWrite($ID&@CRLF)
			Sleep(100)
			If $ID <> 0 Then Cmd($CA_UseItemById ,$ID)
		EndIf
	EndIf
	Sleep(100)
WEnd
ddl is offline  
Thanks
1 User
Old 04/15/2010, 06:08   #10
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
das ist ja genial ! und das beste daran ist ich lese es und verstehe es ^^.
aber eine frage habe ich noch
wieo Cmd($CA_TargetNearestAlly) ging cmd($CA_TargetNextPartyMember) bei dir auch nicht ? oder liegt das an der "while"-schleife das gw jetzt bleibt ?
0ojako0 is offline  
Old 04/15/2010, 07:26   #11
 
elite*gold: 0
Join Date: Jan 2010
Posts: 14
Received Thanks: 0
Danke schon mal bis hier her

ich habe jetzt noch eingebaut das er den helden festflaggt und die dll injection

die dll injection klappt auch nachdem ich das script compiled habe.

jetzt kommt ein fenster mit dem fehler "line 2686"(soviele zeiten hat das script doch garnicht oder ?) Error : Subscript used with non-Array variable.
wie bekomm ich jetzt raus mit welchen array er ein problem hat ?

PHP Code:
#include "GWCAConstants.au3"
#include <DLL_Include.au3>

$wintergreen 21488
$peppermint 
6370
$pumkin 
28433

$cbType 
"int"
While 1
    CmdCB
($CA_GetCoords,-2)
    
Cmd($CA_CommandHero1,10+$CBVar[0],10+$CBVar[1])
    
Cmd($CA_TargetNearestAlly)
    
sleep(500)
    Do
        
$HP CmdCB($CA_GetHP,-2)
        
Sleep(500)
        
UseSkillEx(1,-1)
    
Until $HP[0] = 0
    Sleep
(300)
    Do
        
Sleep(1000)
        
$HP CmdCB($CA_GetHP,-2)
    
Until $HP[0] > 0
    Sleep
(500)
    
$ID CmdCB($CA_FindItemByModelId$wintergreen)
    
$ID $ID[0]
    
ConsoleWrite($ID&@CRLF)
    
Sleep(100)
    If 
$ID <> 0 Then
        Cmd
($CA_UseItemById $ID)
    Else
        
$ID CmdCB($CA_FindItemByModelId$peppermint)
        
$ID $ID[0]
        
ConsoleWrite($ID&@CRLF)
        
Sleep(100)
        If 
$ID <> 0 Then
            Cmd
($CA_UseItemById $ID)
        Else
            
$ID CmdCB($CA_FindItemByModelId$pumkin)
            
$ID $ID[0]
            
ConsoleWrite($ID&@CRLF)
            
Sleep(100)
            If 
$ID <> 0 Then Cmd($CA_UseItemById ,$ID)
        EndIf
    EndIf
    
Sleep(100)
WEnd 
0ojako0 is offline  
Reply


Similar Threads Similar Threads
Having problem Wierd problem with [GUIDE-DETIALED] How to setup a server!
02/10/2010 - EO PServer Hosting - 1 Replies
Hellow, I just used this guide, to set up an EO private server. Everything is correct, but my AccountServer Keeps bugging. Can someOne help me ( via TeamViewer, .. ) ? Thnx, Greets Joris
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 07:52.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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