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
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Wed May 03, 2006 5:54 pm   

Trigger help
 
Health : 201/227 Reserves : 10/10
Mana : 196/197 Reserves : 71/71

Trying to catch the first two numbers in health and mana, and set them to cur/max but I cant seem to get it to catcha t all
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Wed May 03, 2006 7:18 pm   
 
This should do the trick:

Code:
#trigger {^(%w) ~: (%n)~/(%n) Reserves ~: %n~/%n} {#Var Current%1 {%2};#Var Max%1 {%3}}


It will create/update the variables 'CurrentHealth' 'MaxHealth' 'CurrentMana' and 'MaxMana' after triggering on the appropriate text.
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Wed May 03, 2006 7:54 pm   
 
The way that works is rather useful, however it wont catch because of the spacing on each line is different and such
Reply with quote
shalimar
GURU


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

PostPosted: Wed May 03, 2006 8:37 pm   
 
trigger {^(%w)%s~:%s(%n)~/(%n)%sReserves%s~:%s%n~/%n} {#Var Current%1 {%2};#Var Max%1 {%3}}
_________________
Discord: Shalimarwildcat
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Wed May 03, 2006 9:24 pm   
 
from my experience, %s doesn't work.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu May 04, 2006 4:07 am   
 
%s works fine when used properly.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Thu May 04, 2006 6:34 am   
 
the trigger right there didn't work, can you explain why then?
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu May 04, 2006 2:23 pm   
 
It's not working cause either you have a setting different or what is shown on your screen is not exactly what you show here.

#trigger {^(%w)%s~:%s(%n)~/(%n)%sReserves%s~:%s%n~/%n} {#Var Current%1 {%2};#Var Max%1 {%3}}
#echo Health : 201/227 Reserves : 10/10
#echo Mana : 196/197 Reserves : 71/71

#echo CurrentHealth - @CurrentHealth
#echo MaxHealth - @MaxHealth
#echo CurrentMana - @CurrentMana
#echo MaxMana - @MaxMana

CurrentHealth - 201
MaxHealth - 227
CurrentMana - 196
MaxMana - 197

Looks like it's working for me *shrug*
_________________
http://www.Aardwolf.com
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Thu May 04, 2006 5:57 pm   
 
Code:
 Race     : Lycaean     Gender      : Male
 Bloodline: Sarota      Age         : 23
 Class    : Idras       Order       : None
 Guild    : Idras       Guild Rank  : An Idrasi Postulant
 Council  : Ithaqua     Council Rank: Villager

 Overall Level: 54  (97%)  Dazzling
 Bashing Level: 52  (82%)  Brilliant
 Quest Level  : 23  (39%)  Notable
 PK Level     : 3   (48%)  Bright

 Health   : 202/223      Reserves : 10/10
 Mana     : 166/194      Reserves : 71/71
 Endurance: 1018/1018    Reserves : 945/945
 Willpower: 870/870      Reserves : 803/803

 Str: 12/12  Int: 10/10  Dex: 14/14  Con: 12/12


THat is the exact output from the mud, and the triggers above do not owrk for it
Reply with quote
shalimar
GURU


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

PostPosted: Thu May 04, 2006 6:01 pm   
 
#trigger {^%s(%w)%s~:%s(%n)~/(%n)%sReserves%s~:%s%n~/%n} {#Var Current%1 {%2};#Var Max%1 {%3}}

leading spaces threw it off
_________________
Discord: Shalimarwildcat
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Thu May 04, 2006 8:57 pm   
 
It is always helpful to post exact ouput from the Mud.. Hopefully Shalimar has finally answered your request.
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