Tag the mob issue (two variables being set in command line

Scripts and support for your favorite MUD client.
old depok
Sojourner
Posts: 572
Joined: Thu Feb 14, 2002 6:01 am
Location: Philadelphia PA USA

Tag the mob issue (two variables being set in command line

Postby old depok » Tue Apr 22, 2003 5:41 pm

Can mulitple variables be set on the same line?

here is what I am thinking (alias and trigger set to tag a mob in a specific direction and escape the way you came in)...

Command:

tag e fire

This would get you the following results...


Set variable @direction to East
Set Variable @target to Fire
move @direction
Kill @target
escape the reverse of @direction which we will call @escapedir (this would be a trigger that would set @direction to the reverse of whatever @direction is).

so the idea is that instead of typing out E;kill fire;escape w you could just do: t e fire

Not sure it is worth it but could be cool

issue is that I have two variables on the command line (@direction and @target) to set.

Thanks

Depok
Nekler BlazingWolf
Sojourner
Posts: 176
Joined: Sun Feb 04, 2001 6:01 am
Contact:

Postby Nekler BlazingWolf » Wed Apr 23, 2003 12:48 pm

To capture your things from the command line, use %1 and %2

so you would make an alias for "tag"
then in the command part of the alias you would use "#var direction %1" and "#var target %2" to set your @direction and @target variables.
Nekler BlazingWolf
Sojourner
Posts: 176
Joined: Sun Feb 04, 2001 6:01 am
Contact:

Postby Nekler BlazingWolf » Wed Apr 23, 2003 1:20 pm

Ok, I was bored so threw one together.

#ALIAS tag {#var target %1;#var direction %2;#if (@direction = "u") {#var revdirection d} {#if (@direction = "d") {#var revdirection u} {#if (@direction = "n") {#var revdirection s} {#if (@direction = "s") {#var revdirection n} {#if (@direction "e") {#var revdirection w} {#if (@direction = "w") {#var revdirection e} {#echo No direction given!}}}}}};@direction;kill @target;escape @revdirection} "tag_trig"

type "tag fire e" it sends you east, sends "kill fire", and then escapes w.
only thing that will screw it up is if there is no direction back where you came from, in that case, you'll just escape in some random direction per mud code.

Oh, cut and paste into a txt file and import it, or make sure you have "expand vars" turned off in "view/prefrences/general/script parser" if you paste it into the command line.
old depok
Sojourner
Posts: 572
Joined: Thu Feb 14, 2002 6:01 am
Location: Philadelphia PA USA

Postby old depok » Wed Apr 23, 2003 1:32 pm

Thanks Nekler.

I figured you could but thought it up at work and couldn't test it.

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 10 guests