Finde den Fehler in meinem Script nicht [AutiIT]

10/21/2010 16:03 TurboGolom#1
Hi wie oben im Threadnamen beschrieben finde ich den Fehler im Script nicht. Und zwar habe ich ein Problem mit der While 1=1 Schleife und ich weiß net woran es liegt.
Ps: ich weiß das das Script verdammt unübersichtlich ist und auch schlecht gescriptet ist aber naja bin nen Anfänger xD
PHP Code:
While 1=1


#include-once
#include "tt6.au3" 

Opt ("SendKeyDownDelay"50)
Opt ("SendKeyDelay"50)

WinWaitActive ("Guild Wars")




GoOut()

Func goout()

MouseMove (202,259)
sleep (1000)
MouseClick ("left",202,259
MouseMove (541,430)
sleep (1000)
MouseClick ("left",541,430
sleep (9000)
send ("8")
sleep (2000)
send ("7")
sleep (2000)

PrepMoveTo()
MoveTo(1232223686)
MoveTo(1253423340)
MoveTo(1261622884)
MoveTo(1265022363)
MoveTo(1270121854)
MoveTo(1274821320)
MoveTo(1275120776)
MoveTo(1267520260)
MoveTo(1258719775)
MoveTo(1247819163)
MoveTo(1239218684)
MoveTo(1217718180)
MoveTo(1186717720)
MoveTo(1161217333)
  
StopMoveTo ()
  
send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)

send ("{c}")
sleep (500)
send  ("{space}")
sleep (6000)
send ("6")
sleep (2000)
send ("5")
sleep (2000)
send ("1")
sleep (2000)
send ("2")
sleep (4000)
send ("4")
sleep (5000)
send ("1")
sleep (2000)
send ("2")
sleep (250)




send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

 
EndFunc
  


PrepMoveTo
()
 
MoveTo(1172417478)
MoveTo(1200817919)
MoveTo(1237618254)
MoveTo(1290918406)
MoveTo(1337018282)
MoveTo(1398717971)
MoveTo(1460217844)
MoveTo(1519017797)
MoveTo(1576417805)
MoveTo(1577218209)
MoveTo(1581518692)
MoveTo(1637218712)
MoveTo(1703818634)
MoveTo(1713417953)
MoveTo(1731517119)
MoveTo(1737716160)
MoveTo(1806715854)
MoveTo(1794315312)
MoveTo(1796914999)
MoveTo(1798214661)
MoveTo(1799414294)
MoveTo(1798114229)

StopMoveTo ()

  
sleep (5000)
  
send ("6")
  
sleep (3000)
  
send ("5")
  
sleep (1000)
  
send ("{space}")
sleep (500)
send ("1")
sleep (1000)
send ("2")
sleep (5000)
send ("6")
sleep (3000)
send ("5")
sleep (2000)
send ("1")
sleep (1000)
send ("2")
sleep (3000)
send ("6")
sleep (3000)
send ("5")
sleep (2000)
send ("1")
sleep (1000)
send ("2")
sleep (5000)
send ("6")
sleep (3000)
send ("5")
sleep (2000)
send ("1")
sleep (1000)
send ("2")
sleep (5000)
send ("6")
sleep (3000)
send ("5")
sleep (1500)





send ("1")
sleep (750)
send ("3")
sleep (500)
send ("4")
sleep (750)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")
sleep (3500)

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

sleep (3500)

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

sleep (3500)

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")


sleep (3500)

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

sleep (3500)

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")

send ("1")
sleep (500)
send ("3")
sleep (500)
send ("4")
sleep (500)
send ("2")
sleep (2000)
send("6")
sleep (3000)
send ("5")


send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("{v}")
sleep (250)
send ("{space}")
sleep (1000)

send ("(enter)")
send ("(/resign)")
send ("(enter)")
WEND 
10/21/2010 16:43 lolkop#2
öhm also erstmal ist das hier die falsche sektion...

naja und bei dem code würd ich sagen solltest du ersteinmal wissen, dass wenn man gewisse sachen n mal wiederholen will, man das mit schleifen erledigt...

ausserdem solltest du NIEMALS funktionen in einer schleife definieren.

und includes und options gehören immer an den anfang von scripten...
10/21/2010 17:34 TurboGolom#3
oh tut mir leid für die schlimmen Fehler aber wie gesagt bin noch recht unerfahren aber vielen dank für die Tipps und die verbesserungsvorschläge und für die verbesserung des scripts
10/21/2010 20:04 MrSm!th#4
#moved
10/21/2010 20:32 TurboGolom#5
Danke MrSm!th
hätte da noch ne Frage und zwar mit welchen Befehlen ist es möglich das der Cha nach .... Runden zu dem Kaufmann hinläuft und nur bestimmte plätze ( auf denen Items liegen) verkauft. Hinweise etc. reichen schon ich würde mich dann ans probieren wagen xD. Vielen Dank schonmal für die Top Hilfe
10/21/2010 20:48 lolkop#6
wir wissen nicht einmal wovon du sprichst...
10/21/2010 20:54 amnesi#7
mit mouseclick
10/21/2010 21:04 MoepMeep#8
Quote:
Originally Posted by TurboGolom View Post
Danke MrSm!th
hätte da noch ne Frage und zwar mit welchen Befehlen ist es möglich das der Cha nach .... Runden zu dem Kaufmann hinläuft und nur bestimmte plätze ( auf denen Items liegen) verkauft. Hinweise etc. reichen schon ich würde mich dann ans probieren wagen xD. Vielen Dank schonmal für die Top Hilfe
schleifen.
10/23/2010 12:45 .Infinite#9
Vielleicht solltest du dich erstmal mit den Grundlagen vertraut machen, bevor du anfängst irgendwelche Bots zu schreiben. Das was du da hast wird nämlich mit annähernd hundert Prozentuger Sicherheut scheitern.
1. Funktionen
2. Schleifen
3. Variablen
solltest du dir mal angucken.

Ach und die UDF "tt6.au3" brauchst du eigentlich nicht. Ich schätze mal, dass da der Befehl "MoveTo" drin definiert ist. AutoIt hat aber standardmäßig den Befehl "MouseMove".

Hier gibt es genug gute Tutorials, die alles sehr schön erklären ;) Und zum Schluss möchte ich dir nochmal von Klickbots (vor allem bei Onlinegames) abraten. Die sind ungenau, unzuverlässig und nicht variabel!

mfg abba232
10/23/2010 13:21 PenGuin :O#10
MoveTo ist eine Bewegungsengine für das Spiel Guild Wars.
Wenn man dort Koordinaten angibt, bewegt sich der Charakter zu diesen.
Nur mal so nebenbei.