Anyways, I wanna fish, but I'm having problems with the default fishing macro, I'm hoping someone can tell me what I'm doing wrong here...
Whenever I load it I get something akin to Invalid Variable
/varset v99 0
So I removed it and got the same statment about
/varset t1 5m
I then removed it and got
Unparsable (something or other sorry no cut and paste)
/if n $calc(@NoPoles+@NoBait)>0 /call Event_Timer
SO whats going wrong here?
Just for discussion I am including the macro here, if ti is bad form I will refrain in the future from posting the entire file... But here goes.
Code: Select all
| - Fish.mac -
|
#turbo
#event NoBait "You can't fish without fishing bait, go buy some."
#event Cast "You cast your line."
#event Skillup "You have become better at Fishing"
#chat tell
Sub Main
/declare StatSandal global
/declare StatDagger global
/declare StatScales global
/declare StatFresh global
/declare StatZone global
/declare Skillups global
/declare Casts global
/declare NoPoles local
/declare NoBait global
/call ClearStats
/varset v99 0
/varset t1 5m
/doevents flush
:Fish
/call CheckPole
/varset NoPoles $return
/doevents NoBait
/if n @NoPoles==1 /call DoLog "Aborting: Out of poles..."
/if n @NoBait==1 /call DoLog "Aborting: Out of bait..."
/if n $calc(@NoPoles+@NoBait)>0 /call Event_Timer
/if n $calc(@NoPoles+@NoBait)>0 /return
/if $char(ability,fishing)>0 /if $cursor()==NULL /doability Fishing
/if $cursor()==TRUE /call KeepStats "$cursor(name)"
/if "$cursor(name)"=="Tattered Cloth Sandal" /call Destroy
/if "$cursor(name)"=="Rusty Dagger" /call Destroy
/if $cursor()==TRUE /call KeepItem
/doevents
/goto :Fish
/return
Sub Destroy
/click left destroy
/delay 1s
/return
Sub CheckPole
/if "$equip(primary,name)"~~"Fishing Pole" /return 0
/finditem similar "Fishing Pole"
/if "$cursor()"=="NULL" /return 1
/click left primary
/delay 1s
/if "$cursor()"!="NULL" /autoinventory
/return 0
Sub KeepItem
/if "$cursor(name)"!="Fish Scales" /call DoLog "Caught $cursor(name)..."
/autoinventory
/return
Sub KeepStats(Item)
/if "@Item"~~"cloth sandal" {
/varadd StatSandal 1
} else /if "@Item"~~"rusty dagger" {
/varadd StatDagger 1
} else /if "@Item"~~"fish scales" {
/varadd StatScales 1
} else /if "@Item"~~"fresh fish" {
/varadd StatFresh 1
} else {
/varadd StatZone 1
}
/return
Sub Event_NoBait
/varset NoBait 1
/return
Sub Event_Cast
/varadd Casts 1
/return
Sub Event_Skillup
/varadd Skillups 1
/return
Sub Event_Timer(Timer,Value)
/call DoLog "Run time: $calc($running/60) min - Casts: $int(@Casts) - Skill ups: $int(@Skillups)"
/call DoLog "Found: $int(@StatSandal) sandals - $int(@StatDagger) daggers - $int(@StatScales) scales - $int(@StatFresh) fresh fish - $int(@StatZone) zone items"
/varset @Timer @Value
/return
Sub ClearStats
/varset StatSandal 0
/varset StatDagger 0
/varset StatScales 0
/varset StatFresh 0
/varset StatZone 0
/varset Skillups 0
/varset Casts 0
/return
Sub Event_Chat(Channel,Sender,Text)
/mqlog ** @Sender: '@Text'
/return
Sub DoLog(Text)
/mqlog @Text
/echo @Text
/return


