Armageddon General Discussion Board

General => Code Discussion => Topic started by: Newbie on March 08, 2003, 10:05:43 AM

Title: ZMUD VBscript help?
Post by: Newbie on March 08, 2003, 10:05:43 AM
I am interested in speaking with anyone out there who does use VBscript in ZMUD as opposed to using the ZMUD scripting.  I am looking for some functionality that VB would give me when it comes to Aliasing casting.

More specifically I want to do an if statement in VBscript that will cast a certain way if a set of key words is one of the parameters and another way as 'default'.

Please jot a reply with contact info if you might be able to give me some pointers on using VBscript in ZMUD.  Thanks
Title: VBScript
Post by: Sanvean on March 08, 2003, 07:42:17 PM
Could you post the applicable snippet from your script?
Title: ZMUD VBscript help?
Post by: Mr Eggo on March 09, 2003, 08:40:29 PM
I can help.

VB Script is pretty straight forward, to check if a sub string is in a string use the following:

if instr(strtofind,strtofinditin) <> 0 then 'the string is found
   'perform some action here
elseif (strtofind2,strtofinditin) <> 0 then 'as many else ifs as you need
   'perform another action
else
   'perform some other action
end if

if you need direct help, shoot us a code snippet.
Title: ZMUD VBscript help?
Post by: Mr. Eggo on March 09, 2003, 08:43:27 PM
In my last reply I forgot to add the instr() function to the elseif statement it has the same syntax as the 'if' with a different parameter

I have become completely dependent on auto complete IDEs......:(

jmordetsky
Title: ZMUD VBscript help?
Post by: John on March 09, 2003, 10:17:43 PM
An advantage to creating an account is you can edit your posts :P

You might want to check out a VBScript tutorial (http://www.w3schools.com/vbscript/default.asp) ;)