About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Nethran
Novice


Joined: 25 Apr 2011
Posts: 32

PostPosted: Thu May 26, 2011 5:23 pm   

Newbish Question (Process of Elimination with Variables)
 
My script:
Code:

Trigger:
*is*on the * with your %1 causing*damage.
Value:
#IF (%1=bash) {#VAR bashes {%eval(@bashes+1)}}
#IF (%1=slash) {#VAR slashes {%eval(@slashes+1)}}
#IF (%1=pierce) {#VAR pierces {%eval(@pierces+1)}}
#IF (%1!=bash&%1!=slash&%1!=pierce) {#VAR exotics {%eval(@exotics+1)}}


In the MUD I play, there are probably like a dozen or more damage types. I want anything not bash, slash or pierce to be classified into "exotic".
I'm missing something somewhere, because when I land a slash, pierce, or bash attack it goes into the right spot, but it also adds up into exotic as well. I end up with this:

Code:

Offensive Statistics:
  Pierce:         31             Bash:            5
  Slash:           7           Exotic:           43



This is the last bug/formatting error I have in this script, so as soon as this gets squared away it's done. :x I figured my check for @exotics would work, but again, I'm a newb, and I'm not too ashamed to post my newbie problems.
Reply with quote
shalimar
GURU


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

PostPosted: Thu May 26, 2011 5:27 pm   
 
You should not be using %1 in the pattern, for starters. and the final if evaluation is just bad syntax... try this

Code:
#TR {is*on the * with your (%w) causing*damage.} {
#IF (%1=bash) {#VAR bashes {%eval(@bashes+1)}}
#IF (%1=slash) {#VAR slashes {%eval(@slashes+1)}}
#IF (%1=pierce) {#VAR pierces {%eval(@pierces+1)}}
#IF (%1!=bash AND %1!=slash AND %1!=pierce) {#VAR exotics {%eval(@exotics+1)}}
}
_________________
Discord: Shalimarwildcat
Reply with quote
Nethran
Novice


Joined: 25 Apr 2011
Posts: 32

PostPosted: Thu May 26, 2011 5:52 pm   
 
I'm not sure why, but with your script, this is happening:

Code:

[Mail]<1563hp 1342sp 1539st>
Your magically enhanced weapon slices cleanly through a citizen!
A citizen is cut on the torso with your slash causing huge damage.




A citizen is cut on the arm with your slash causing giant damage.




A citizen is cut on the torso with your slash causing tremendous damage.




A citizen is cut on the torso with your slash causing unbearable damage.




A citizen fails to hit you with his first attack.
You dodge out of the way of a citizen's second attack.
You are smashed on the arm by a citizen's bash causing mild damage.
A citizen is barely clinging to life.

(Mount: 2617st)
[Mail]<1530hp 1342sp 1531st> A citizen is barely clinging to life.

(Mount: 2617st)
[Mail]<1530hp 1342sp 1531st> A citizen is barely clinging to life.
Reply with quote
Nethran
Novice


Joined: 25 Apr 2011
Posts: 32

PostPosted: Thu May 26, 2011 6:01 pm   
 
I would like it to be known that I am a moron. There were blank lines beneath the code that were causing it to 'hit enter' and throw blank lines onto the screen when it triggered.

>_<
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