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


Joined: 02 May 2005
Posts: 2

PostPosted: Mon May 02, 2005 5:58 am   

If, Else If, Else statements
 
I have what will hopefully be a simple question to answer.

I'm trying to do what I thought would be a very simple If, Else If, Else statment in zmud. Except that as far as I could determine zmud will not do and else if, merely if, else.

So I thought I would be smart and try to use vbscript inside of zmud, except I cannot get it to output to the mud screen of zmud.

So to make a short story long, can anyone give me any assitance or pointers on how to get vbasic script to output to the mud, and/or how to get zmud to do an if, series of else if statements?

Thanks in advance for any help.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon May 02, 2005 10:14 am   
 
#IF (a) {true} {#IF (b) {false a, true b} {#IF (c) {false a, false b, true c} {else something more}}}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Ned
Newbie


Joined: 02 May 2005
Posts: 2

PostPosted: Mon May 02, 2005 3:18 pm   
 
Well that was certainly a lot easier than what I was trying to do. Thanks!
Reply with quote
dwold
Newbie


Joined: 03 Jun 2006
Posts: 3

PostPosted: Mon Oct 30, 2006 10:59 pm   VBScript if then else etc
 
Well I know this is a little late compared to the topic date, but Ill post it anyways.


To use Zmud functions within VBScript you need to know what to call with zMudCommand. You will find all the references in the developers pack of zmud, in a file called Zmud.inc .


I will post a really quick example of a trigger that I use to roll stats, its short, sweet and to the point. Well as far as vbscript goes anyways.

Code:

'Quick and Simple Stat roller for Dawn Of Ages (Zmud)
'Trigger :: (Str:(%d) Qui:(%d) Dex:(%d) Int:(%d) Wis:(%d) Con:(%d) Cha:(%d))
varRollCounter = varRollCounter+1
varComSend   =178
varComGag   =74

zMudCommand varComGag

varStr      =%1
varQui      =%2
varDex      =%3
varInt      =%4
varWis      =%5
varCon      =%6
varCha      =%7

varFullString   =    "Str: " & _
         varStr & _
         " Qui: " & _
         varQui & _
         " Dex: " & _
         varDex & _
         " ((Int)): " & _
         varInt & _
         " ((Wis)): " & _
         varWis & _
         " Con: " & _
         varCon & _
         " Cha: " & _
         varCha






If (varInt <= 35 AND varWis <= 35 AND varCha <= 70) Then
   varResponse = MsgBox("Roll #: " & varRollCounter & vbNewLine & "A Result has been found, do you wish to keep?" & vbNewLine & varFullString,vbYesNo+vbExclamation,"Match!")
      If varResponse = vbYes Then
         zMudCommand varComSend, "y"
      Else
         zMudCommand varComSend, "n"
      End If
Else
   zMudCommand varComSend, "n"
End If
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