testing for character stance...

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

Moderator: MacroQuest Developers

gder
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Oct 15, 2002 11:36 pm

testing for character stance...

Post by gder » Tue Oct 15, 2002 11:56 pm

I'm working on a foraging macro, just downloaded the program the other night so I hope I didn't miss something in the manual. Also looked at some other code but couldn't find anything quite like what I'm looking for...

Curently this will run in the background, forages and keeps everything and properly handles things if a character is attacking something.

Okay...here come the questions...:)

1) /if $char(ability,forage)>0 /call DoForage
Is this a reasonable (read: reliable) way to check if the forage skill is loaded and ready to go?

2) What is the best way to make sure the cursor has been cleared if something is on it? (placed in autoequip)

3) Is it possible to test if a character is sitting or standing?
aka. /if SITTING { /stand /dosomething /sitbackdown }, or if standing remain standing....

Any help appreciated...code below

Code: Select all

Sub Main


:WaitForage
/if $char(ability,forage)>0 /call DoForage
/doevents
/delay 10
/goto :WaitForage 


Sub DoForage
/if $combat==TRUE {
/attack off
/varset v10 1 
}

/doability forage

/if $invpanel==FALSE /press i

/mouseto auto
/click left
/delay 5
/click left

/if $invpanel==TRUE /press i
/if $v10==1 /attack
/varset v10 0

/doevents
/return



/endmacro

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Wed Oct 16, 2002 2:24 am

$cursor is what your looking for.

Check out the tradeskill scripts in the Macro Depot for ways to use it.

No way of checking sitting atm. I use an event for the text that says "You must be standing to forage" (or whatever it is ) and /stand in the event sub.

Fippy

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Wed Oct 16, 2002 4:47 am

Code: Select all

/if $char(ability,forage)>0 /call DoForage
and

Code: Select all

/if $v10==1 /attack
should be

Code: Select all

/if n $char(ability,forage)>0 /call DoForage
and

Code: Select all

/if n $v10==1 /attack
numeric /if commands, some rather interesting problems crop up if they aren't used properly :wink:

gder
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Oct 15, 2002 11:36 pm

Post by gder » Wed Oct 16, 2002 2:18 pm

Vale, thanks for the heads up. Missed that the first time I read it in the readme. so I'm assuming that if you leave off the 'n' /if does a string compare?

Fippy: thanks as well...I'll take a closer look at cursor.

Truespirit
decaying skeleton
decaying skeleton
Posts: 7
Joined: Tue Oct 08, 2002 7:58 am

Post by Truespirit » Thu Oct 17, 2002 9:57 am

For your sitting / standing problem you don't actually need macroquest. Simply add the line /sit off (to stand up if sitting) or /sit on (to sit down if standing) to any script or for that matter a hotkey in everquest.


Truespirit :twisted:

weapon
a ghoul
a ghoul
Posts: 101
Joined: Tue Oct 01, 2002 7:20 pm

sit / stand

Post by weapon » Thu Oct 17, 2002 11:10 am

2) One good way to clear a cursor :)

Code: Select all

:WaitForDrop 
    /click left auto 
    /doevents 
    /if $cursor()==TRUE /goto :WaitForDrop 
3) /sit on or /sit off is a not a toggle command its just /sit unless the new patch changed it. Any way to work around it /stand will make u stand no matter what and will not make you sit if you are standing. Use that to get to a known stance then /sit from there. Thats how I do it anyway.

Truespirit
decaying skeleton
decaying skeleton
Posts: 7
Joined: Tue Oct 08, 2002 7:58 am

Post by Truespirit » Thu Oct 17, 2002 1:12 pm

Actually you'll find that /sit (on/off) has always been a toggle command. /Stand was put in for all of you strange people that couldn't undertand that /sit off meant stand up, and was infact only added a few months ago.

/sit off

Will cause you to stand, or stay standing if you already are.

/sit on

Will likewise cause you to sit, or remain sitting if you already are.

If you doubt this I suggest you run everquest, or simply look at one of the most often used hotkeys in the game... The shaman canib dance.

/sit off
/cast 1
/cast 1 (gets round fizzles)
/delay (can't remember the spell length but you need to delay before sit)
/sit on

Alternatively look in the patch MOTD's from verant and you'll see its actually detailed (back in March somewhere if memory serves).

Truespirit :twisted:

gder
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Oct 15, 2002 11:36 pm

Post by gder » Thu Oct 17, 2002 5:43 pm

For your sitting / standing problem you don't actually need macroquest. Simply add the line /sit off (to stand up if sitting) or /sit on (to sit down if standing) to any script or for that matter a hotkey in everquest.
Actually just sitting and standing is not the problem. What I need to be able to do is test if the character is sitting or not and then be able to return them to the same stance after the macro has done its job.

So if the person was sitting to begin with they would stand up/forage/sit back down. If they were standing it would just forage and leave them standing. This prevents awkward situations likehaving your macro sit you down in the middle of a fight or while traveling somewhere.

Basicly the whole point of this is so I don't have to watch my forage button anymore. As it stands the macro will see if the character is attacking andhandle that situation correctly. Only bug I've found so far is if you're at the bank andthe forage button pops up...then things tend to get a little strange.

Anyway...I've already been told that character stance is not something that can be tested for at this time so the point is moot. If I could find a newer copy of Wice or wdasm I might go looking for the offset...

Also thanks for the help with the cursor all...I'll be putting the code in tonight and testing it out...

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Thu Oct 17, 2002 8:15 pm

Truespirit wrote:/sit on

Will likewise cause you to sit, or remain sitting if you already are.
Incorrect. /sit off will always make you stand, but /sit on is a toggle. will make you stand if you're sitting, and vice-versa.