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
Gintonic
Beginner


Joined: 04 May 2018
Posts: 12

PostPosted: Fri May 04, 2018 9:02 am   

Need help setting up a trigger pattern
 
Hey gurus,

I hope this forum is still active sometimes. I cut to the thing straight away. I'm playing on a foreign language MUD, therefore the mud example might look weird, but Ill translate everything.

When I party with other players, I can call info about their stats with a command. It lists party members and they stats. and it looks like this:

Code:

Nev                 Hp          Sp          Mp           Szintek   XP meg
Player01 (vezeto)   1339/1339   1058/1058   867/904      55/55/55  117394208 
Player02            759/759     527/527     938/1004     51/51     43084323

and the lines continues based on how many members your party has. "Nev" = Names, Hp Sp Mp pretty self explanatory, Szintek = Levels (multi class mud) "XP meg" = XP required and "(vezeto)' marks the party leader.

My problem is to get a trigger pattern to be able to assign values to these variables: @partymembername or @partyleadername, @partymember01hp, @partymember01maxhp, @partymember01sp, @partymember01maxsp, @partymember01mp, @partymember01maxmp and I dont really care about the levels and Xp.

I would love to be able to have a pattern or some solution capturing these variables for all party members, regardless the amount of players in the group. the lines pop up as it showed in the code and usually followed by only the prompt line.

Anyone has an idea how to attack this?
Reply with quote
shalimar
GURU


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

PostPosted: Fri May 04, 2018 1:45 pm   
 
Something like this might work:

#TR {(%x) ({~(vezeto~)|})%s(%d)/(%d)%s(%d)/(%d)%s(%d)/(%d)} {
#ADDITEM partyMemberName %1
#IF (%2) {partyLeaderName=%1}
#VAR %concat(%1, "Hp") {%3}
#VAR %concat(%1, "HpMax") {%4}
#VAR %concat(%1, "Sp") {%5}
#VAR %concat(%1, "SpMax") {%6}
#VAR %concat(%1, "Mp") {%7}
#VAR %concat(%1, "MpMax") {%8}
}
_________________
Discord: Shalimarwildcat
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