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


Joined: 05 Mar 2010
Posts: 1
Location: England

PostPosted: Fri Mar 05, 2010 9:05 pm   

Help splitting NPC locations
 
Hello fellow scripters!
I've been making fairly basic scripts for a while now, but have come stuck with how to approach this one :(
I wish to match a changing description to a stringlist of desired NPCs and then output it without delay to either another window or #STW
A couple of examples:

Example 1:
A gullible pickpocket is one southwest, the limit of your vision is one southwest from here, the limit of your vision is one southeast from here, nine tiny ducklings and a loud duck are one northeast and the limit of your vision is one northeast from here.

Example 2:
The limit of your vision is one southeast from here, a door northeast of one northwest, two Imperial guards are one northwest and the limit of your vision is two northwest from here.
---
The directions can be 'a guard is one northeast and one east' or just 'a guard is one east', and I am unsure what the best approach would be.
I was looking at removing the limit of your vision, replacing the commas with a seperator and storing it in a @npcmap string list.
Then using a FORALL loop, to go through each @npcmap %i and trying to use %pos or %ifmember, to match the desiered NPCS stringlist (@NPCS) to the @npcmap line, but I can't quite figure out the best way to match it or handle its output, so that is' fast, any help would be greatly appreciated :)

Thankyou
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