Help section from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
mackster
- a ghoul

- Posts: 95
- Joined: Mon Sep 09, 2002 3:02 pm
Post
by mackster » Mon Sep 09, 2002 3:10 pm
I saw the farmpad.mac by arantius2, which works flawlessly as posted. I thought I would try my hand at modifying it to suit my needs and hunt down willowisps. It worked, but its no disregarding the no drop/no rent junk...it's looting everything. I'm not sure how to make it stop.
I modifyed this string to hopefully tell it what I want, and what I don't want:
edit: codebrackets are yummy
Code: Select all
/varset v10 0
:LootLoop
/click left corpse $v10
/delay 5
/if "$cursor(name)"=="NULL" /goto :LootDone
/if "$cursor(name)"~~"greater" {
/click left auto
} else /if "$cursor(name)"~~"lightstone" {
/click left auto
} else /if "$cursor(name)"~~"burned" {
/click left destroy
/delay 1
/click left 458 420
/delay 1
I also added the /lootnodrop never command.
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Mon Sep 09, 2002 3:16 pm
Aren't the burned ones named burnedout lightstones? If so then your script will auto equip those b/c of the
it's putting it in your inven and not detroying it. I fyou want to destroy the burned out ones but that lines first so if it's not a burned out one then it will equip.
-
mackster
- a ghoul

- Posts: 95
- Joined: Mon Sep 09, 2002 3:02 pm
Post
by mackster » Mon Sep 09, 2002 3:40 pm
Ahh I see now, I cleaned up the code a little bit and changed it to only loot 'greater' and it is now destroying the stuff i don't want. Thanks. :)
Last edited by
mackster on Mon Sep 09, 2002 4:56 pm, edited 1 time in total.
-
mackster
- a ghoul

- Posts: 95
- Joined: Mon Sep 09, 2002 3:02 pm
Post
by mackster » Mon Sep 09, 2002 4:03 pm
Just one other question, how would I make my character use their special attacks, such as kick, automatically?
-
Meh
- a lesser mummy

- Posts: 32
- Joined: Wed Sep 04, 2002 8:55 pm
Post
by Meh » Mon Sep 09, 2002 4:27 pm
compliments of l142rd and imperfect
Code: Select all
Sub Main
:Loop
/if $char(ability,"Flying Kick")>0 /doability "Flying Kick"
/goto :Loop
-
cyberglitch
- a lesser mummy

- Posts: 42
- Joined: Wed Jun 26, 2002 4:40 pm
Post
by cyberglitch » Mon Sep 09, 2002 4:40 pm
Or you could also simply. where 1 in you abilities slot is kick or special ability. But the otherway is better.
Code: Select all
Sub Main
:Loop
/doability 1
/goto :Loop
/return
-
mackster
- a ghoul

- Posts: 95
- Joined: Mon Sep 09, 2002 3:02 pm
Post
by mackster » Mon Sep 09, 2002 5:20 pm
if the code under sub main looks like this:
edit: code brackets make the world go round
Code: Select all
sub Main
/lootn never
/alert clear 1
/alert add 1 npc willowisp
/press esc
:Start
/call findTarget
/varset v11 $target(id)
/call killTarget
/if n $target(id)==$char(id) /goto :Stop
/target corpse
/if n $target(id)==$v11 /call lootTarget
/goto :Start
:Stop
/attack off
/call autorun 0
/lootn always
/return
where do I insert the doability loop? I've tried in between the :start and :stop, but that didn't work. I am still learning what exactly the code on the top does, so not sure where to place it. Thanks.
-
DeathSpiral
- a ghoul

- Posts: 95
- Joined: Thu Aug 22, 2002 6:31 pm
Post
by DeathSpiral » Mon Sep 09, 2002 6:39 pm
mackster wrote:where do I insert the doability loop? I've tried in between the :start and :stop, but that didn't work. I am still learning what exactly the code on the top does, so not sure where to place it. Thanks.
You'd actually want to put it in the killTarget sub... altho, I don't think this will do it overly cleanly (ie, to make sure it keeps doing the ability as often as it can). To make it 'clean' in that regards, I'd have to rewrite the function. If I did that, it'd make me want to rewrite a few other functions, which would lead to more... and I really don't feel like doing that right now as I need to get back to 'work' (pfaw) to make real money *sigh*.
Code: Select all
Sub killTarget
/varset v60 $target(id)
/if $v60==0 /return
/varset t0 2m
/varset v12 1
/varset v80 0
/face nopredict
:Follow
/if n $target(id)==$char(id) /return
/if "$target(id)"!="$v60" /goto :KillDone
/if "$target(name)"~~"corpse" /goto :KillDone
/face nopredict
/if n $target(distance)>12 /call autorun 1
/if n $target(distance)<15 {
/call autorun 0
/if $v12==1 {
/if n $target(id)==$char(id) /return
/call findTarget |anti-ks code
/if "$target(id)"!="$v60" /goto :KillDone
/attack on
/varset v12 0
}
| Change the Flying Kick below to the name of what you would rather use
/if n $v12==0 /if n $char(ability,"Flying Kick")>0 /doability "Flying Kick"
}
/if n $t0==0 /press esc
/varset v51 $char(x)
/varset v52 $char(y)
|/delay 1
/if n $v51==$char(x) /if $v52==$char(y) /call tree $v12
/goto :Follow
:KillDone
/sendkey up up
/attack off
/delay 3
/return
-
mackster
- a ghoul

- Posts: 95
- Joined: Mon Sep 09, 2002 3:02 pm
Post
by mackster » Mon Sep 09, 2002 8:09 pm
Cool that worked! Thank you all for the help, this is really handy.
-
Imperfect
- Macro Author

- Posts: 319
- Joined: Fri Jun 14, 2002 1:52 am
Post
by Imperfect » Mon Sep 09, 2002 8:59 pm
If you still wanted to loot LS's instead of ONLY GLS's you could do it this way...
Code: Select all
/varset v10 0
:LootLoop
/click left corpse $v10
/delay 5
/if "$cursor(name)"=="NULL" /goto :LootDone
/if "$cursor(name)"~~"greater" {
/click left auto
} else /if "$cursor(name)"~~"burned" {
/click left destroy
} else /if "$cursor(name)"~~"lightstone" {
/click left auto
/delay 1
/click left 458 420
/delay 1
-
rizwank
- Huggle Police

- Posts: 524
- Joined: Tue Jul 23, 2002 12:07 am
-
Contact:
Post
by rizwank » Mon Sep 09, 2002 9:11 pm
fast destroy would also need to be on.
-
Eqbot
- decaying skeleton

- Posts: 7
- Joined: Mon Sep 16, 2002 6:03 pm
Post
by Eqbot » Sat Sep 21, 2002 12:14 pm
That seems cool can you post the full code for it?
-
Fippy
- a snow griffon

- Posts: 499
- Joined: Tue Jul 16, 2002 10:42 am
Post
by Fippy » Sat Sep 21, 2002 4:02 pm
Lol thats just lazy of you eqbot do it yourself.
-
Eqbot
- decaying skeleton

- Posts: 7
- Joined: Mon Sep 16, 2002 6:03 pm
Post
by Eqbot » Sat Sep 21, 2002 4:14 pm
Ok I guess im worse off then I thought. I really dont get any of this so do I replace his Sub killTarget with the other one?? And no need to be rude I don't know what im doing so I thought I could ask for the author to copy his code which would take a few seconds of his life instead of me wasting time trying to figure it out.