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
Thalir
Novice


Joined: 10 Aug 2002
Posts: 35
Location: USA

PostPosted: Wed Jun 15, 2005 4:11 am   

PLEASE HELP ~ Triggering off the Right Key words.
 
Hey guys,
I'm running into another problem with a trigger i've been using.

Derep came up with a trigger i've been using from another thread where i had asked a similar question, the trigger works great for when i was fighting small Shadows and shadow Spawns it picks up the last word of the string and repeats the command.
Below are my examples.

EXAMPLE MUD TEXT FOR CURRENT TRIGGER

This room is illuminated.
You see the 1st small shadow and the 1st shadow spawn

claw shadow or claw spawn is what the trigger below sends to the mud
which works perfect.


Code:
#TRIGGER {You claw at * (%w)!} {}
#COND {You claw at * (%w)!} {claw %1}



Now i'm having problems using it with another Mob that uses different key words to execute the claw command.

EXAMPLE MUD TEXT FOR NEW MOB

This room is illuminated.
You see the 1st firian warrior spirit and the 1st greater moaning spirit.

(the key words to execute the claw command are highlited as bold text in this example.)

Now when using the above trigger i get claw spirit which is fine for clawing at the greater moaning spirit, SPIRIT is its key word.
Problem begins when trying to claw at the firian warrior spirit its keyword is WARRIOR but the above trigger sends claw spirit regardless.


Is this problem even fixable if so how?
I've tried a few different tweaks but nothing seems to work.

Right now i'm using:
Code:
#TRIGGER {You claw at * (%w)!} {}
#COND {You claw at * (%w)!} {claw warrior}

And just stopping the trigger manually if there is a spirit in the room then killing it which is fine. I'd just like to be able to streamline the whole process



Any Help would be much appreciated.

Thanks.
_________________
Thalir
Who ever said bards lie?
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Wed Jun 15, 2005 8:32 pm   
 
Can you paste an actuall battle with the both?
Reply with quote
Thalir
Novice


Joined: 10 Aug 2002
Posts: 35
Location: USA

PostPosted: Wed Jun 15, 2005 9:39 pm   
 
Below is a short log using the original trigger on the Arachnian Warrior Spirit.

NOTE: in this area there are 2 types of warrior spirits. Arachnian Warrior Spirit and Firian Warrior Spirit. To shorten the log i've only used Arachnian Warrior Spirit, however the same problem exists with both mobs.


Code:
#TRIGGER {You claw at * (%w)!} {}
#COND {You claw at * (%w)!} {claw %1}



MUD LOG WARRIOR

[Ruins]

Dirt and small stones litter the dull floor, spreading outward from the hole that was once a gateway. The remains of the oaken doors lie broken, separated, and shattered by whatever broke into this place.

This room is illuminated.
You see the 1st arachnian warrior spirit.
Obvious exits: southeast south southwest.
>

The arachnian warrior spirit makes a quick strafing run on Thalir...

The arachnian warrior spirit swings a rusty steel long sword at you!
The swing is a strong blow to the left leg.
Your heavy moonsilver mail absorbs about half of the damage!
Your thick scales absorbs a bit of the damage.
Your left leg takes 10 points of slash damage!

claw warrior
You claw at the arachnian warrior spirit!
The attack is a strong slash to the head.
The arachnian warrior spirit is knocked back!
It just fell 10 feet!
[3 sec. delay]
You claw at the arachnian warrior spirit!
claw spirit
The attack is a decent slash to the torso.
[2 sec. delay]
>

The arachnian warrior spirit stands up.
I don't see what you are referring to.
>
claw warrior
You claw at the arachnian warrior spirit!
The attack is a good slash to the head.
The arachnian warrior spirit is knocked back!
[3 sec. delay]
You claw at the arachnian warrior spirit!
claw spirit
The attack is a decent slash to the left arm.
The arachnian warrior spirit is knocked back!
It stumbles and falls down!
[2 sec. delay]
>
The arachnian warrior spirit stands up.

I don't see what you are referring to.
The arachnian warrior spirit turns and runs southeast!

END LOG

In this example BOLD BLUE TEXT is what i typed from the command line to trigger the script. BOLD RED TEXT is what the trigger actually is sending to the mud once the strings are matched.

As you can see the Trigger sends CLAW SPIRIT to the mud when the correct command is CLAW WARRIOR it seems to be picking up the last word in the desciption arachnian warrior SPIRIT

The next log shows the trigger works perfect with the other mob that roam the area as the last word in its descirption is greater moaning SPIRIT


MUD LOG SPIRIT

[Ruins]

The clutter of several overturned benches and seats blocks any way of getting to the shattered window in the southern wall. Trees and bushes from the outside lean into the room, almost as though taking shelter from the weather.

This room is illuminated.
You see the 1st greater moaning spirit.
Obvious exits: north northeast northwest.
>
The greater moaning spirit claws at you!
The attack is a strong blow to the left arm.
Your heavy moonsilver mail absorbs about half of the damage!
Your thick scales absorbs a bit of the damage.
Your left arm takes 5 points of slash damage!

claw spirit
You claw at the greater moaning spirit!
The attack is a good slash to the head.
The greater moaning spirit is knocked back!
[3 sec. delay]
You claw at the greater moaning spirit!
claw spirit
The attack is a well-delivered slash to the right leg.
The greater moaning spirit is knocked back!
[2 sec. delay]
>
The greater moaning spirit claws at you!
The attack is a good blow to the left leg.
Your heavy moonsilver mail absorbs about half of the damage!
Your thick scales absorbs a bit of the damage.
Your left leg takes 9 points of slash damage!

You claw at the greater moaning spirit!
The attack is a strong slash to the left rear arm.
The greater moaning spirit is knocked back!
[3 sec. delay]
You claw at the greater moaning spirit!
claw spirit
The attack is a strong slash to the head.
The greater moaning spirit is knocked back!

The greater moaning spirit moans before fading into the netherworlds.
[2 sec. delay]
>

With a crash, everything it was carrying falls to the ground before you.
I don't see what you are referring to.

END LOG

With this example i only had to type claw spirit once as you can see there is only 1 claw spirit marked as blue bold text which is from the comand prompt. The rest is all red which is what the trigger sent to the mud.

hope this helps.
if you need more info please let me know.

Again, thank you for the help!
_________________
Thalir
Who ever said bards lie?
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Wed Jun 15, 2005 10:36 pm   
 
Ok maybe this can easily be solved adding a variable and an alias
Code:

#ALIAS claw {~claw %1;#VAR Target %1}
#TRIGGER {You claw at * (%w)!} {}
#COND {You claw at * (%w)!} {claw @target}


That should set the target to @target and claw only that target, when you send in the "claw something" command
Ie: Claw Spirit, will continue to claw the spirit
Claw Warrior, will continue to claw the warrior

Hope that helps a bit
Reply with quote
Thalir
Novice


Joined: 10 Aug 2002
Posts: 35
Location: USA

PostPosted: Wed Jun 15, 2005 11:58 pm   
 
This is working perfect.

Derep you rock!

I cant thank you enough for your time and effort, really i'm gratefull.


Cheers Mate!
_________________
Thalir
Who ever said bards lie?
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