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


Joined: 07 Mar 2009
Posts: 1

PostPosted: Sat Mar 07, 2009 10:34 pm   

Novice needing assistance converting trigger from zMud to CMud
 
Any and all help would be so very, very welcome and appreciated!

When I say “novice” I mean, when it comes to the writing of triggers, I am at a complete loss. A a book “zMUD and CMud for Dummies” might come in handy and do me some good in this area. Confused

I am trying to convert a working experience calculator trigger from ZMud to work with CMud and am not having much luck. I did not make the trigger myself; it was something given me many years ago when I first started playing the mud. I have included the trigger, the error message, (a screenshot of the error wouldn’t copy over), how the score for the character looks, and the type of mud I play.

Surinene

The trigger is as follows:
#CLASS {Experence}
#VAR Exp1 {0}
#VAR Expold {3846253}
#VAR Exp {3846253}
#TRIGGER {Exp: &%d{Exp}} {#MATH Exp1 {@Exp - @Expold};#SUB {Exp: @Exp ~(@Exp1~)};@Expold = @Exp;@Exp1 = 0}

When I enter this into the command line to copy over I receive the error message : illegal token: = @Exp

This is what the character score looks like:
Surinene the silvan Scholar (Heroic)
HP: 180/180 END: 180/180 Exp: 115588 Avg. Stats: 80

The type of MUD is: running the TMI-2 1.1.1 mudlib on MudOS v22pre8
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Sun Mar 08, 2009 12:48 am   
 
Could you try #var Exp1 %eval(@Exp - @Expold) for #math

Really I have no clue, because I am one of the primitives (notice manicure dragging on ground) who did not purchase CMud yet.

Though maybe soon, as I am less likely to blame zuggsoft for being mysterious and certainly guilty of my bad scripts.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Mar 08, 2009 2:15 am   Re: Novice needing assistance converting trigger from zMud to CMud
 
Surinene wrote:
a book “zMUD and CMud for Dummies” might come in handy

Something similar already exists here. The particular section you want in this case is this one. All you need to do is remove the two @s:

#TRIGGER {Exp: &%d{Exp}} {#MATH Exp1 {@Exp - @Expold};#SUB {Exp: @Exp ~(@Exp1~)};Expold = @Exp;Exp1 = 0}

And it should work.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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