door opening

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

Moderator: MacroQuest Developers

kndzakndza
orc pawn
orc pawn
Posts: 12
Joined: Wed Aug 21, 2002 2:59 am

door opening

Post by kndzakndza » Thu Aug 22, 2002 7:49 pm

I have tried to use the "doortests.mac"
and don't quight understand how to or IF i need to alter it... i am making a macro that will run me from one loc to another but between the two loc's there is a door that i have to stop and open

Code: Select all

Sub Main
    /mqlog Testing on Door ID=%p0
	/doortarget id $p0
	/face door
	/delay 6
	/mqlog Target Door Information: id=$door(id) name=$door(name) state=$door(open) loc=$door(y), $door(x), $door(z) heading=$door(heading)
	/mqlog             (continued): defaultloc=$door(defaulty), $door(defaultx), $door(defaultz) defaultheading=$door(defaultheading)
	/mqlog             (continued): headingto=$door(headingto) distance=$door(distance) distance2=$distance(door)
	/press u
	/delay 5
	/mqlog             (after use): state=$door(open) loc=$door(y), $door(x), $door(z) heading=$door(heading)
/return


when i type the doortests command it will open the door but it will say

"Id specified but no number provied"
"Face: item but no item targeted"

can someone help or maby give a helpfull hint of what i need to put in or do

thanks

powerspike
a ghoul
a ghoul
Posts: 80
Joined: Sun Aug 11, 2002 11:40 pm
Location: Australia
Contact:

Post by powerspike » Thu Aug 22, 2002 8:36 pm

(code taken from doortests.mac)

Code: Select all

/doortarget id $p0
/face door
/press u

the /doortarget targets the door
the /face door makes sure your facing it
and the /press u is the bit that opens it for you .

kndzakndza
orc pawn
orc pawn
Posts: 12
Joined: Wed Aug 21, 2002 2:59 am

Post by kndzakndza » Thu Aug 22, 2002 11:11 pm

:) got it thanks

User avatar
Ravena666
a ghoul
a ghoul
Posts: 101
Joined: Fri Aug 23, 2002 2:57 am

Post by Ravena666 » Fri Aug 23, 2002 3:29 am

all you need to do is...

Code: Select all

 /press u 
it will open the door as long as your looking at it
G`Luck

:Raven in your window:
Last edited by Ravena666 on Thu Sep 05, 2002 10:14 pm, edited 1 time in total.

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Post by gingertips » Tue Sep 03, 2002 6:25 am

Sorry,

Im really struggling to get my head round this bit.

Macro im working on is almost complete, but door is causing a problem. There is a certain door I need to get thru - now i could just use /press u, but theres a risk the door could already be open...

whats best way to once at the door to face the door, check to see if its shut & if it is open it, if not then move to next loc??? am i supposed to identify an exact door ID & if so, how???

This is confusing me - just need someone to explain it again! thanks

eq_freak
a ghoul
a ghoul
Posts: 105
Joined: Mon Jun 24, 2002 7:17 am

Post by eq_freak » Thu Sep 05, 2002 10:52 am

Well I had some door problems in one of my scripts. I would go through a door, wait for a mob to agro me, then try to go back through the door. Unfortunately the timing was such the the door-closing animation would push my char to the right, and make me miss the door opening, thus getting my char stuck.

Basically what I did was target the door, and simply have a small loop waiting for it to be closed. Then once its closed i proceed to open it and go through it like normal.

Code: Select all

		/doortarget
		/face nopredict door
		:waitdoor
		/if $door(open)=="TRUE" /goto :waitdoor
		/delay 2
		/call GotoLoc 343,-819 u
The delay 2 is needed or you will try to open the door before the animation of the door closing is actually finished.

elkcit
a lesser mummy
a lesser mummy
Posts: 34
Joined: Sat Aug 31, 2002 3:20 pm

/doortarget

Post by elkcit » Thu Sep 05, 2002 9:58 pm

with no parameter, does that target nearest door?

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Post by gingertips » Fri Sep 06, 2002 4:33 am

nice - i will try that - i assume you can target the specific door id as well just to be on the safe side?

elkcit
a lesser mummy
a lesser mummy
Posts: 34
Joined: Sat Aug 31, 2002 3:20 pm

/doortarget

Post by elkcit » Fri Sep 06, 2002 7:41 pm

my question is... does /doortarget with no parameter actually target door nearest your loc?

eq_freak
a ghoul
a ghoul
Posts: 105
Joined: Mon Jun 24, 2002 7:17 am

Post by eq_freak » Sat Sep 07, 2002 6:38 am

Yes it targets nearest door.