|
giddorahboy Newbie
Joined: 11 Apr 2006 Posts: 8
|
Posted: Wed Apr 12, 2006 8:03 pm
Another question! (Underlined Mobs) |
/OFFTOPIC - You may skip this info:
Okay, so why am I asking so many questions?
The reason is that I am playin a mud, where I am in a clan, where alot of people I really like and really think are cool are. They have helped me since day one, always treats me with respect and always shows me appreciation. I do not have enough time or knowledge about the mud itself to help them out in any way. However, I thought I would try to repay my debt by creating a big zmud-script collection for them to use. I am the one with the most programming experience, but I have never programmed in Zmud (Only some similar languages)
/ONTOPIC
I want to make mobs in certain areas have clickable names. So that if you run into mobs in a certain room, and there are 4 of them, they are all underlined, but you will kill the mob you click.
What is the command for "underline/linking" text into writing vars? I guess it has something to do with triggers. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Apr 12, 2006 8:17 pm |
#TRIGGER {({@stufftokill})} {#SUB {~<send "kill %1">%1~</send>}}
weather its underlined or not is set in prefs under mxp |
|
_________________ Discord: Shalimarwildcat |
|
|
|
giddorahboy Newbie
Joined: 11 Apr 2006 Posts: 8
|
Posted: Wed Apr 12, 2006 8:42 pm |
Hmmm. That makes a trigger called "({@stufftokill})"
|
|
|
|
giddorahboy Newbie
Joined: 11 Apr 2006 Posts: 8
|
Posted: Wed Apr 12, 2006 8:44 pm |
Ah! Wait, nevermind :)
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Apr 12, 2006 9:27 pm |
It doesn't quite matter since they behave exactly the same, but when using MXP like that I'd use #MXP instead of #SUB. It gives me a clear idea of what I was trying to do when two months later something else I was working on breaks it or uncovers a previously unforeseen design problem.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
giddorahboy Newbie
Joined: 11 Apr 2006 Posts: 8
|
Posted: Thu Apr 13, 2006 1:27 am Okay, Now on to another question. |
Both of your answers were awesome :) Thanks a bunch :)
Now on to another problem.
Now I want to create the following:
1) I do a who and a list of players shows up.
2) I want to add the players, via a #Trigger, that has (WHATEVER) as their pretitle to a @var
3) I want a trigger that greets these players and does a spellup on the people on the list in this @var
4) I want a trigger that wishes these players a good day when they leave the room
5) I want to be able to choose with a command/#Alias which pretitle to add to this @var.
The important thing is that ONLY the people in my variable gets this, and the second most important thing is to be able to change what makes it trigger with a command (Or #Alias)
Now what would be the easiest way to do this? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu Apr 13, 2006 5:15 am |
#TR "morewhatever" {~({@pretitle}~) (%x)} {#IF (%ismember( %1, @whatever)) {#NOOP} {#VAR whatever {%additem( %1, @whatever)}}}
This trigger will add folks to the variable if they arent there already.
#TR {({@whatever}) logs in} {greet %1;spellup %1}
#TR {({@whatever}) leaves the room} {wish %1 a good day}
pretitle="whatever" |
|
_________________ Discord: Shalimarwildcat |
|
|
|
giddorahboy Newbie
Joined: 11 Apr 2006 Posts: 8
|
Posted: Thu Apr 13, 2006 11:00 am |
1) I need to be able to clear the variable completely with a command.
2) How do I set which pretitle it adds? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu Apr 13, 2006 11:44 am |
it adds whatever the value of @pretitle currently is
to reset the list of friends
whatever=""
pretitle="this"
pretitle="that"
pretitle="the other" |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|