Frage: Schneeball Arena

12/30/2009 15:56 stinkbombe#1
Kann mir einer einen Bot schreiben, welcher ein Geschenk welches in Range droppt instant aufhebt?

Also wenn man neben dem läufer der gegner herläuft, vom verbündetem kommt der knock und man hebt es sofort auf.

Aber er darf wenn jetzt z.b. oben rechts eins droppt und man steht noch oben links nicht dort hinrennen.

Bezahlung gibts natürlich auch.
12/30/2009 16:19 ddl#2
erstmal falsches forum
dann schreibs dir selber mit gwca is es nich schwierig!
12/30/2009 16:26 stinkbombe#3
ich habs versucht, komme nur nicht weiter....
hier der code:
PHP Code:
#include <WindowsConstants.au3>
#include "GWCAConstants.au3"
 
$cGUI GUICreate("GWCA")
GUIRegisterMsg(0x500"WndCallback")
 
HotKeySet("ü","onoff")   ;hier nen hotkey zum starten
$u
=0
 
Func onoff
()
 
Select
  
Case $u 
    $u 
1
    cmd
($CA_StatusBot,1)
  Case 
$u 
    $u 
0
    cmd
($CA_StatusBot,2)
 
EndSelect 
Endfunc 
 
While 1
 
Switch ($u)
  Case 

   _Itemaufheben
()
   
sleep(50)
  Case 
0
   sleep
(100)
 EndSwitch
Wend 
 
Func _Itemaufheben
()
    
Cmd($CA_TARGETNEARESTITEM)
    
sleep(100)
    
$cbType "int"
    
$aItem =cmdCB($CA_GetNearestItemToAgentEx,-2)
    
cmdCB($CA_GetWeaponType,-2)
    
$waffe$cbVar[0]
    If 
_IntToFloat($aItem[1]) < 500 and $waffe <> 0 then Cmd($CA_PickupItem,$aItem[0])
    
sleep(1000)
Endfunc 
 
Func Debug
($text)
 
ConsoleWrite("> DEBUG: "&$text&@CRLF)
EndFunc 
deshalb will ich mir halt einen kaufen o_O
12/30/2009 16:35 ddl#4
Code:
Func _Itemaufheben()
	$cbType = "int"
    $blub = Cmd($CA_GetNearestItemToAgentEx,-2)
	$blubid = $blub[0]
	$blubdis = $blub[1]
    sleep(100)
    cmdCB($CA_GetWeaponType,-2)
    $waffe= $cbVar[0]
    If _IntToFloat($blubdis) < 500 and $waffe <> 0 then Cmd($CA_PickupItem,$blubid)
    sleep(1000)
Endfunc
12/30/2009 16:37 SuneC#5
Why are you sleeping for 100ms after getting the id and dis to the item? That's silly and would make the pick up bot incredibly slow.
12/30/2009 16:45 ddl#6
mhh yep you´re right
12/30/2009 16:46 stinkbombe#7
mit deinem code bekomme ich bei benutzung von ü einen error

Quote:
Subscript used with non-Array variable.:
$blubid = $blub[0]
$blubid = $blub^ ERROR
12/30/2009 17:07 ddl#8
dann kommt nix zurück
12/30/2009 20:35 buFFy!#9
Quote:
Originally Posted by DDL View Post
erstmal falsches forum
beim nächsten mal reporten bitte.

#moved
#closed