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


Joined: 01 May 2020
Posts: 2

PostPosted: Fri May 01, 2020 8:02 am   

Can I get a little bit of help plz.
 
Ok, so when i scan, i get :

Shinde [Player] is close by to the north.

I'd like to have the players taken from this script, and output like this when i scan:

Shinde [Player] is close by to the north.



<class name="Pk Where" id="1393">
<class name="Location" id="1394">
<trigger priority="1520" id="1395">
<pattern>^(%w) * ~((*)~)</pattern>
<value>#IF (%ismember( %1, @enemy)) {
#GAG
#SAY {%ansi( red, bold)-%1- %ansi( yellow, bold) Enemy %ansi( blue, bold)~(%ansi( green)%2%ansi( blue, bold)~)}}</value>
</trigger>
<trigger priority="1530" id="1396">
<pattern>^(%w) ~((*)~)</pattern>
<value>#IF (%ismember( %1, @enemy)) {
#GAG
#SAY {%ansi( red, bold)-%1- %ansi( yellow, bold) Enemy %ansi( blue, bold)~(%ansi( green)%2%ansi( blue, bold)~)}
}</value>
</trigger>
</class>
<class name="Enemies" id="1397">
<trigger priority="1540" id="1398">
<pattern>^~[*%d~] %s(%w)</pattern>
<value>#ADDI enemy %1</value>
</trigger>
<trigger priority="1550" id="1399">
<pattern>^~[*%d~] ~*(%w)</pattern>
<value>#ADDI enemy %1</value>
</trigger>
</class>
<alias name="elist" autoappend="true" id="1400">
<value>#VAR enemy {}
#T+ enemies
clan list 2
#WA 1000
clan list 30
#WA 1000
clan list 121
#WA 1000
clan list 151
#WA 1000
#T- enemies</value>
</alias>
<var name="enemy" type="StringList" id="1401">
<value>Shadowlight|Zim|Sabon|Coin|Ascent|Mikee|Aeark|Cernix|Desolate|Dilznic|Jesterman|Wildsoul|Luminus|Valanthe|Vid|Paradox|Datanyon|Tozen|Parable|Cosine|Marivel|Rongg|Eliana|Rainor|Electrocane|Inevitable|Treezehl|Atrocitus|Alya|Syrex|Tezza|Inixius|Laikos|Zeldris|Spyro|Barom|Ruvyan|Chastiser|Ilsa|Treq|Grimspore|Lusifer|Mushu|Noxwolf|Niax|Pogdush|Youandi|Spunkie|Jeeves|Mobyrick|Gnuroes|Legalas|Ogie|Lillith|Dragish|Xane|Caro|Skye|Gaius|Ladytoxik|Shigeru|Krim|Alexandros|Yulin|Vicylolin|Aquata|Smile|Kever|Saef|Fiesta|Piru|Undisputed|Disbeliever|Lasse|Luchtloper|Bambam|Stakker|Snowlily|Lukeduke|Mafkees|Visara|Nydel|Untouchable|Floyd|Svane|Anasati|Bibo|Savior|Afk|Boduke|Camillus|Olorin|Darum|Smoric|Oribe|Xenon|Aegle|Arkos|Ront|Rekt|Nedrow</value>
<json>["Shadowlight","Zim","Sabon","Coin","Ascent","Mikee","Aeark","Cernix","Desolate","Dilznic","Jesterman","Wildsoul","Luminus","Valanthe","Vid","Paradox","Datanyon","Tozen","Parable","Cosine","Marivel","Rongg","Eliana","Rainor","Electrocane","Inevitable","Treezehl","Atrocitus","Alya","Syrex","Tezza","Inixius","Laikos","Zeldris","Spyro","Barom","Ruvyan","Chastiser","Ilsa","Treq","Grimspore","Lusifer","Mushu","Noxwolf","Niax","Pogdush","Youandi","Spunkie","Jeeves","Mobyrick","Gnuroes","Legalas","Ogie","Lillith","Dragish","Xane","Caro","Skye","Gaius","Ladytoxik","Shigeru","Krim","Alexandros","Yulin","Vicylolin","Aquata","Smile","Kever","Saef","Fiesta","Piru","Undisputed","Disbeliever","Lasse","Luchtloper","Bambam","Stakker","Snowlily","Lukeduke","Mafkees","Visara","Nydel","Untouchable","Floyd","Svane","Anasati","Bibo","Savior","Afk","Boduke","Camillus","Olorin","Darum","Smoric","Oribe","Xenon","Aegle","Arkos","Ront","Rekt","Nedrow"]</json>
</var>
<trigger priority="1560" id="1402">
<value>#VAR enemyplayer %1
#VAR enemyplace %2
#GAG
#SAY {%ansi( green)@enemyplayer %ansi( yellow, bold)Enemy %ansi( blue, bold)~(%ansi( green)@enemyplace%ansi( blue, bold)~)}
</value>
</trigger>
<trigger priority="1570" id="1403">
<pattern>You are currently in:</pattern>
<value>#T+ location
#WA 2000
#T- location</value>
</trigger>
</class>
Reply with quote
shalimar
GURU


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

PostPosted: Fri May 01, 2020 12:41 pm   
 
All you need is some simple coloring triggers, just make sure the one with the enemies has a larger priority number so the line coloring one fires first.

#TR {is close by to the} {#CO red}
#TR {{@enemies}} {#CW hotpink}
_________________
Discord: Shalimarwildcat
Reply with quote
hezkizel
Newbie


Joined: 01 May 2020
Posts: 2

PostPosted: Sun May 03, 2020 10:26 am   
 
That doesn't quite work... that just colors anything or anyone that is 2 rooms away, red, nothing else. This is what I see when i scan.

Tadamir the guildsman [Open Shop] is right here to the north.
Half of a gemhound is right here to the north.
An alley cat is right here to the east.
A filthy beggar is right here to the east.
The Minx is close by to the east.
The salesman is close by to the east.
A Rune city guard is not far off to the east.
A Rune city guard is not far off to the east.
The indentured servant is not far off to the east.
A small green frog is not far off to the east.
The landless serf is not far off to the east.
The vagabond is a brief walk away to the east.
The landless serf is a brief walk away to the east.
The salesman is a brief walk away to the east.
The Minx is a brief walk away to the east.
A small green frog is a brief walk away to the east.
The janitor is a brief walk away to the east.
The janitor is a brief walk away to the east.
Adaeriel [Player] is a brief walk away to the east.
A filthy beggar is rather far off to the east.
The drunk is rather far off to the east.
An alley cat is rather far off to the east.
A very sexy woman is rather far off to the east.
A Rune city guard is rather far off to the east.
A stray dog is rather far off to the east.
A bag lady is rather far off to the east.
The indentured servant is right here to the west.
The drunk is right here to the west.

So now with the new addition, anything that, is close by to the, is colored red but that's it.
Reply with quote
shalimar
GURU


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

PostPosted: Sun May 03, 2020 11:30 am   
 
So we expand the trigger to include an anonymous variable with all those options:

#TR {{right here|close by|not far off|brief walk away|rather far off} to the} {#CO red}
_________________
Discord: Shalimarwildcat
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