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
Corleidum
Novice


Joined: 30 Apr 2003
Posts: 43
Location: Sweden

PostPosted: Tue May 04, 2004 3:22 am   

KTBIN->zMUD
 
I have a question. I have a script in KTBIN that I would like to make into an zMUD script, but I don't know the commands that should be used in zmud.

It's a people finder script.

Looks like this:
#var Members {member1 member2)
#var who1 {Corleidum Lightbulb Zugg}
#var who2 {pa xx1 xx2}
#var who3 {someone someone2 someone3}
#var who4 {someone}
#var maxalt {4}
#var swho1 {unknown1 unknonw2} (s=special)
#var smaxwho 1
#alias ++whosecret {#var looper {0};#loop 1,$smaxwho {#math {looper} {$looper+1};#if {#finditem $1 {${swho$looper}}} {#show ${swho$looper}}}}
#alias ++whoiselse {#var looper {0};#loop 1,$maxwho {#math {looper} {$looper+1};#if {#finditem $1 {${who$looper}}} {#show ${who$looper}}}}
#alias whois {
#var searchname {};
#firstupper searchname %0;
#foreach {$members} {#if {#finditem {$searchname} {${$0}}} {#showme {$searchname is $0}}};
++whoiselse $searchname;
++whosecret $searchname}

#alias whoof (){

}



Ok, now what is this? well its a people finder. Lets say Lightbulb talks to me (hope you don't mind me using your alias)
He talks to me, i want to know who he is.
so it will display Lightbulb whoeverheiswithanotherchar athirdcharperhaps.

So basically I want it to search the vars and displays who he is.
Also I would like, if possible to add. ie:_

addwho lightbulb XXXX

so it will search for a var with 'lightbulb' in it and add xxxx..
etc.
Reply with quote
Kronus
Wanderer


Joined: 13 Jan 2002
Posts: 76
Location: USA

PostPosted: Tue May 04, 2004 6:10 am   
 
KTBIN? Sorry, what is this?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue May 04, 2004 3:41 pm   
 
Many of the commands in your script, such as #alias and #var, use exactly the same name in zMUD, although the syntax may be slightly different so you'll need to look them all up. Others use slightly different names, such as #foreach/#FORALL but they should still be obvious. And some of your commands appear to take the place of zMUD functions, such as #finditem/%ismember and #firstupper/%proper.

However, this is mere speculation on my part since I'm not familiar with KTBIN, and in fact never heard of it before this topic. I'm not planning to ever use KTBIN so there's no reason for me to learn it and I don't have any references to learn it from anyway.

If you're planning to use zMUD then you should learn to use zMUD and converting scripts is one way to do that. The zMUD helpfile has complete lists of every command and function, sorted both alphabetically and by purpose. They can easily be found from the Contents page of Help, under the Reference booklet. In addition to the lists on the Contents page, the Command Reference and Function Reference pages can often be quite helpful. These two pages list most commands/functions organized by purpose, with a brief explanation of the purpose of each command/function and a link to the help-topic which covers it in detail.
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