Code: Select all
$read filename line
$read CoolStuff.Txt 5
Would read line 5 of CoolStuff.txt
/write
Code: Select all
/write filename option text line
/write CoolStuff.Txt a Hello There 5
would write Hello There on line 5 of CoolStuff.txt
/write CoolStuff.Txt c Hello There
would clear CoolStuff.Txt and write Hello There on the first line. Also have the option to clear the text file completely.
$find
Code: Select all
$find filename option text
$find BobsSpells.txt e Spirit Of Wolf
Searches bobsspells.txt for Spirit Of Wolf and gives back the line #
(matching is exact but not case sensative)
$find BobsSpells.txt w Spirit Of
Searchs bobsspells.txt for *Spirit of* and returns the lines it is on
(matching is a wild card)
Script Example
Code: Select all
#event CAST "you begin to cast"
sub main
:loop
/doevents
/goto :loop
/return
sub event_cast
/varset v1 $find bobsspells.txt e $arg(5, "$p0") | or whatever it is to get the spell name
/varset v2 $read bobsspells.txt $v1
/varset t1 $arg(2, "$v2")
sub event_timer
|unsure on the timer event stuff but...
if $p0 == t1 { /cast spell $v2 }
That's just ruff code. im a little rusty from being inactive for a while.


