Simple macro help

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Eqbot
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 16, 2002 6:03 pm

Simple macro help

Post by Eqbot » Thu Sep 19, 2002 10:02 pm

Hi all! I tried the fishing macro someone put out and I really like it! I was wondering however if someone could help me make it so that it actually keeps all the fish instead of destroying them though? I also want it to check if my inventory is full and then just destroy the fish or (if its possible) run to a merchant and sell all of the fish then go back to the original spot and fish some more then rinse and repeat. So can anyone help me with one or the other? Thanks a lot! The code I already have is:

Code: Select all

| - Fishing.mac - 
| 
#include routines.mac 

Sub Main 
   /cleanup 
   /target npc peasant 
   :Fish 
   /call CheckPole 
   /if $return==1 /return 
   /if n $t0==0 /call Fish 
   /if n $t1==0 /call Beg 
   /if n $t2==0 /call Sneak 
   /if n $t3==0 /call Mend 
   /if n $t4==0 /call Feign 
   /if "$cursor(name)"~~"scales" /click left destroy 
   /if "$cursor(name)"~~"Tattered cloth" /click left destroy 
   /if "$cursor(name)"~~"rusty" /click left destroy 
   /if "$cursor()"!="NULL" /click left auto 
   /if n $freeinv(space)<2 /call Junkcheck 
   /goto :Fish 
/return 

Sub CheckPole 
   /if "$equip(primary,name)"~~"Fishing Pole" /return 0 
   /finditem "Fishing Pole" 
   /if "$cursor()"=="NULL" /return 1 
   /click left primary 
   /if "$cursor()"!="NULL" /click left auto 
/return 

Sub Fish 
   /doability 1 
   /varset t0 55 
/return 

Sub Beg 
   /doability 3 
   /varset t1 10s 
/return 

Sub Sneak 
   /doability 5 
   /varset t2 45 
/return 

Sub Mend 
   /doability 8 
   /varset t3 5s 
/return 

Sub Feign 
   /doability 9 
   /delay 3 
   /stand 
   /delay 1 
   /stand 
   /varset t4 9s 
/return 

Sub Junkcheck 
    
   /sendkey down shift 
   /finditem "Tattered Cloth Sandal" 
   /delay 3 
   /if "$cursor()"!="TRUE" /click left destroy 
   /delay 3 
   /finditem "Rusty Dagger" 
   /delay 3 
   /if "$cursor()"!="TRUE" /click left destroy 
   /delay 3 
   /finditem "Fish scales" 
   /delay 3 
   /if "$cursor()"!="TRUE" /click left destroy 
   /delay 3 
   /sendkey up shift 

/return 

/if $gm==TRUE /call Crap 

Sub Crap 
  /cleanup 
  /sit 
  /reply Sorry, camping, can't talk now. 
  /delay 20 
  /q 
  /unload 
/return 
Thanks a lot in advance!!!

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Thu Sep 19, 2002 10:33 pm

Lots of unnecessary lines in this script.. it's a bit redundant with all the destroy crap... it's backwards from how I would write the check and destroy and it does a check and destroy twice in the script??

Do some goto's for vendor when packs are full(do a search) then ref the sell item in the routines. Goto again...and loop...

There...how's that? You even get learn how to script this way :P


Mag

Eqbot
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 16, 2002 6:03 pm

Hmm.

Post by Eqbot » Fri Sep 20, 2002 4:03 pm

Im pretty new so can anyone help me put that in? Im also new to scripting and stuff heh. Any help would be great! If not thats ok to heh. Anyway thanks in advance all!

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Fri Sep 20, 2002 4:21 pm

Liz posted a walking to target type script on the boards somewhere..do a search and plug and play etc.


Mag

Eqbot
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 16, 2002 6:03 pm

Okies

Post by Eqbot » Fri Sep 20, 2002 5:43 pm

Thanks! Doing a search now.