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
hwired
Newbie


Joined: 08 Nov 2006
Posts: 5

PostPosted: Thu Nov 09, 2006 3:08 am   

lets give this another try!
 
sorry my last post may have been a bit confusing so i'll start again...

mud output will be this:

[quote]
Quote:
+* A Darkie *+, +* A Darkie *+, +* A Darkie *+, a mob and +* A Darkie *+ are fairly far off north from here


pretty close = 1 room, fairly far off = 2 rooms, long ways off = 3 rooms

so basically i want zmud to read that and put in a command

gtell 4 darkies 2 north from here

so it needs to read how many rooms what direction and number of enemies...btw enemies are the +* *+ and can be anything in them

ta guys hopefully someone can help
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Thu Nov 09, 2006 10:31 pm   sample
 
do you think you could post a sample output of the text you were describing?
All and all, i think this will be fairly easy to get it to do what you want
_________________
Rufus- Winner of Stuff
Reply with quote
hwired
Newbie


Joined: 08 Nov 2006
Posts: 5

PostPosted: Fri Nov 10, 2006 12:05 am   
 
Quote:

You scan in all directions:
+* A Darkie *+, +* A Darkie *+, +* A Darkie *+, a mob and +* A Darkie *+ are fairly far off north from here.


thats the output,

hope that helps
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Fri Nov 10, 2006 2:30 am   
 
yarr it does help,
but real quick. why dont you care about that mob? And do you just want this to work for darkies, or are you trying to make this as something that will work for all npc's without them being pre-defined?


hrm. ah the mob isnt an enemy
_________________
Rufus- Winner of Stuff
Reply with quote
hwired
Newbie


Joined: 08 Nov 2006
Posts: 5

PostPosted: Fri Nov 10, 2006 3:05 am   
 
basically the mud is a playerkilling mud...Evil players vs Good players

so for example it could be

Quote:

You scan in all directions:
+* A Pixie *+, +* A Giant *+, +* A High-Elf *+ are pretty close down from here.


anything in +* *+ are the opposite aligned players that we gotta kill :)......so yeah anything not inside the +* i want left out

so pretty mud if i scan any enemies i want to inform my group through the command gtell

gtell 3 darkies 1 down from here!!!

thanks hope that clears it up
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Fri Nov 10, 2006 3:08 am   
 
Yeah, i'm just about done with churning out some stuffs to do this. do you have AIM by any chance? Lets chat and we can fine tune this.
_________________
Rufus- Winner of Stuff
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Fri Nov 10, 2006 4:41 am   
 
alright, so here's what i got for you.

have the first statement reset your variables, and turn on the trigger that will tally up the enemies, and the temp trigger tallies and does the command, then turns it off after it has done its work.

Code:
#TR {You scan in all directions} {@moblist = 0;@mobdir = 0;@mobdirnum = 0;@mobtypes = 0;#T+ tallytrigger;#T+ dirdisttrigger;#TEMP {from here} {#T- tallytrigger;#T- dirdisttrigger;tallytell}}


now the tally trigger
Code:
#TR {~+~*%s&mob%s~*~+} {@temp1 = %ismember(%1,mobtypes;#IF @temp1=0 {#ADDITEM mobtypes %1;@temp2 = %ismember(%1,@mobtypes);#VA type@temp2 1} {#ADD type@temp1 1}}


now the dirdist trigger
Code:

#TR {&dist &%wdir from here} {#if %1="pretty close" {@dist = 1};#if %1="long ways off" {@dist = 3};#if %1="fairly far off" {@dist = 2}}


and the alias that compresses all the strings and sends the tell

Code:
#ALIAS tallytell {#LOO 1,%numitems(mobtypes) {@temp3 = %concat(%item(mobtypes, %{i}," x",@type%{i});@tellmessage = %concat(@tellmessage,@temp3)};gt @tellmessage are @dist @dir  }



yarrr..... you have to give the triggers the correct id's cause i forgot to do that
_________________
Rufus- Winner of Stuff
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Fri Nov 10, 2006 4:43 am   
 
Also that was a lot more of a pain than i figured it would be!
_________________
Rufus- Winner of Stuff
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