Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
gamblejay
Beginner


Joined: 13 Jun 2015
Posts: 15

PostPosted: Sat Feb 24, 2018 11:31 pm   

String list problem
 
Not sure what exactly I'm doing wrong here since I've used this before on another MUD for GAGing things and it worked just fine. However this time what I was trying to do was make it so when ever I entered a room and saw a specific MOB I would just auto attack it. Now because the MUD has Mobs that are in several different postitions when you enter the room I broke it down A-Z.

I'd snag and copy the description of them standing there: A bobble headed kid is standing here

create a variable string list and call it EnemyB, add the standing description to the slot and save. Then create a trigger with @EnemyB for the pattern and kill b for the execute.

Works great when I first create it, however. When I find another NPC that uses the same letter thus making me add it to the string list, for instance: A blue bird is flying here

It refuses to execute the command for either just some of them or all of them. I tested it by deleting one of the variables and adding them all at the same time, worked fined. It's only when I go to add new ones AFTER I've saved that first time. Highly confused, anyone else ran into this issue?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Feb 24, 2018 11:45 pm   
 
Using just one member of the list

#TR {@EnemyB} {kill b}

Should work.

As soon as it becomes more than one item in the list when it expands in the pattern, it makes it near impossible to match.
A quick workaround is adding the list syntax to the pattern:

#TR {{@EnemyB}} {kill b}

Then it knows to only match one of the possible options.
_________________
Discord: Shalimarwildcat
Reply with quote
gamblejay
Beginner


Joined: 13 Jun 2015
Posts: 15

PostPosted: Sun Feb 25, 2018 2:56 am   
 
Awesome, the second one fixed it all right up. Thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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