Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
easal
Novice


Joined: 21 Jun 2005
Posts: 38

PostPosted: Mon Jan 16, 2006 11:43 pm   

Temporary remapping of numpad
 
Ok, this is what I want to do.

My char has a skill, barge, which is a pain to use manually, and so it just doesn't get used.

I'll just paste the skill desc.

Quote:
Chivalry - Barge

Syntax: BARGE <player> <direction>
This ability will barge a player to the direction you choose. To start the
ability, you must be in a room adjacent to the room where the target player
resides, and you must choose to barge him in a direction that wouldn't take him
into the room you are in. So, for instance, say that Isildur is in a room to
the north of me, and that this room has another exit to the ne. I would do
BARGE ISILDUR NE.


Basically, I want to be able to use a macro for it. Things would go in this order.
1) Hit macro
2) This would start the attack sequence, barge @targ, but hold onto it. It would also temporarily change the numpad input into a variable to be placed in the command, say if a numpad key was hit within 1.5 secs.
3) If a numpad is hit, the command get's sent, if not, then the command is cleared and the numpad reverts to normal usage.

So in combat I'd move out of a room, hit the macro, then in quick succesion a direction to barge the enemy, and with that the command would go in and I'd attack.

I'm not sure if that's clear enough. I know I can have #if statements and different states on the numpad to deal with the direction, but how do I get the command to be held, a new variable added then the command sent?

Thanks a bunch if anyone can help.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 17, 2006 3:15 am   
 
Short example...
#KEY DIV {#ALARM BargeTime +1.5 {BargeMode=0};BargeMode=1}
#KEY KEY9 {#IF (@BargeMode) {barge @targ ne} {ne}}

That uses the key '/' on the numpad for setting the activity. You will have to set the targ variable though.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
easal
Novice


Joined: 21 Jun 2005
Posts: 38

PostPosted: Wed Jan 18, 2006 3:56 pm   
 
Embarassed That's much simpler than what I was trying to do.

It works a charm too, thanks Vijilante. Laughing
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net