AutoIt

07/28/2009 00:26 emofishcake#1
im tryin to get my understanding how scripting language works,

and ive tried writing something just to make it freeze the autopill number value (11 days etc)

and the error keeps showing:

Line-1
Error: unknown Function name



Ther Script is this:
#RequireAdmin
#Region ;**** CREATED BY emoHaxor ****
#AutoIt3Wrapper_Res_Comment=Autopot (Mayn Mem.)
#AutoIt3Wrapper_Res_Description=AUTOrandom (Mayn Mem.)
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0.0
#EndRegion ;**** CREATED BY emoHaxor ****
#include <Nomadmemory.au3>
#include <Array.au3>
#include <memory.au3>
WinWaitActive("TwelveSky2")

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

;ADRESSES!!!!
$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
$HPAddy = 0x00C85DDF
$HP = _MemoryRead($HPaddy, $ID)
$ChiAddy = 0x00C85DE7
$Chi = _MemoryRead($Chiaddy, $ID)
$pillnoAddy = 0x00C60754
$pillno = _MemoryRead($pillnoAddy, $ID)
$pillHPAddy = 0x00C60758
$pillHP = _MemoryRead($pillHPAddy, $ID)
$pillCHIAddy = 0x00C6075C
$pillCHI = _MemoryRead($pillCHIAddy, $ID)
$AttackSPDAddy = 0x00C85E03
$AttackSPD = _MemoryRead($AttackSPDAddy, $ID)
$MoveSPDAddy = 0x00C607FC
$MoveSPD = _MemoryRead($MoveSPDAddy, $ID)


;ATTEMPTED SCRIPT!!

Func PillnoFreeze()
SetPrivilege("SeDebugPrivilege", 1)
$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
_MemoryWrite($pillnoAddy, $ID, 15)
While 1
PillnoFreeze()
Wend
_MemoryClose($ID)

EndFunc ;==>PillnoFreeze

;INCLUDED SHIZZLE FOR ENDING AND PAUSING + IMPORTANCE LIST

While 1
HP()
Chi()
AOE()
WEnd

Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('AOE BOT "Paused"', 512, 15)
WEnd
ToolTip("")
EndFunc ;==>TogglePause



Func Terminate()
ToolTip('AOE BOT "Exiting"', 512, 15)
Sleep(1000)
ToolTip("")
Exit 0
EndFunc ;==>Terminate




[No credit taken by me for the content in this, all credit to the original source of some parts, just for my knowledge purposes only ty ^^]
07/28/2009 00:38 strikeraid#2
your missing something like this

#include <Nomadmemory.au3>

not that one, but maybe a different one.

or

you have one of those lines in there that isn't required?

play around with it.


EDIT: just noticed there's alot of things wrong with your script. i can see you tried combining different scripts.
07/28/2009 00:41 emofishcake#3
cheers, yehh im fiddling about with it, got rid of 2 errors, just stuck on this one XD
u got any idea which files shud be included?
ill try putting in a few random ones and see where i get ^^
07/28/2009 00:46 strikeraid#4
you see this part?

While 1
HP()
Chi()
AOE()
WEnd

that means its gonna repeat the HP() function then chi then aoe then restart back at hp.

problem is... you don't have any of those functions.

a function would look like

Func HP()
blah blah blah
endfunc

that error you're getting might be the least of your problems. haha.
07/28/2009 00:51 marcoyang#5
I think ur script will raise another problem..
<--
Func PillnoFreeze()
SetPrivilege("SeDebugPrivilege", 1)
$ID = _MemoryOpen(ProcessExists("TwelveSky2.exe"))
_MemoryWrite($pillnoAddy, $ID, 15)
While 1
PillnoFreeze()
Wend
_MemoryClose($ID)

EndFunc ;==>PillnoFreeze
--->
This function can cause nested loop cause u call the function itself.
and for the error..
<--
While 1
HP()
Chi()
AOE()
WEnd
-->
I dont see any function named HP() Chi() or AOE().. maybe u r not give us the complete script. Only this i can comment. :)
07/28/2009 00:56 emofishcake#6
haha i started learning scripting about 3hrs ago so im pretty new, but i realised the bit that strikeraid is talking about.
and:
Removed this:
While 1
HP()
Chi()
AOE()
WEnd


and replaced whith:
While 1
PillnoFreeze()
Wend

but now like marco pointed out ive got a some loop error, is there a way to tell the script to execute that function just once, and not loop?
07/28/2009 00:58 strikeraid#7
while1
wend


anything between those loops.
07/28/2009 01:22 emofishcake#8
i tried taking the autopill out of the loop commands
but then nothing happens, but if it is inside, it works for about 10 secs, then says looping passed its limit or something, is there anything to tell it to execute it once, im tryin to read up but nothing so far XD
07/28/2009 01:23 strikeraid#9
so what are you trying to achieve with this anyways? autopill? or making a bot?

you can search up toggles but i'm not sure if thats what you're looking for.
07/28/2009 01:27 emofishcake#10
lol well basicly im just trying to figure out how the scripting works.

my goal atm is to make a script so that when i launch my script once converted to exe, it will just make the autopill values change and freeze

same as if i were to manually use Cheat engine, and input the address then freeze the value.

so i want the script to do the same as what i would manually do on cheat engine to show the autopill on the bottom right of the screen. hope this makes sense XD
07/28/2009 01:30 strikeraid#11
i'm doing the same as we speak. i'm not very good at coding (started 1week2days ago), but with my abilities i would say you'll need 3 different scripts. if anyone else has any ideas on making it 1 script. pm me. LOL. its going into that trainer you saw.
07/28/2009 01:35 emofishcake#12
awesome =D gl with urs!! ill pm u if i get onto n e thing more ^^ i found a link with a bunch of commands for autoit if it helps:
[Only registered and activated users can see links. Click Here To Register...]