Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Nov 05, 2006 8:59 pm   

How do I use an alias for targetting
 
So basically i have the alias:


alias : tp
value: trip @tartemp1

Now in zmud, i can type tp orc and it will trip orc, or if I have my target variable actually set, it will try to trip that target, but in cmud, I can't have it so that I can type tp orc to trip orc, I have to either set it to target or change the value of the alias too trip %1. how can I get around this?
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sun Nov 05, 2006 9:46 pm   
 
This sounds like a bug. You didn't post your version of CMUD... As you using 1.13?
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Sun Nov 05, 2006 9:46 pm   
 
yeah I didn't realize I was suppose to until after I posted, but yes I'm using the lastest 1.13.
Reply with quote
darkspot
Apprentice


Joined: 29 Jul 2002
Posts: 105

PostPosted: Mon Nov 06, 2006 2:13 am   
 
value
#if (%null(@tartemp1)) {trip @tartemp1} {trip %param(0)}

should work. no longer does it automatically include a %-1 after the end of the alias, you have to imply it... another... no if statement way to make it function as old, is
value:
trip @{tartemp1} %param(0)
Reply with quote
fwah
Beginner


Joined: 08 Nov 2006
Posts: 14

PostPosted: Wed Nov 08, 2006 10:39 am   
 
Is this going to get fixed?

I personally prefer the old ZMUD fashion of creating a simple alias and being able to use it on whatever. (e.g., #alias b {cast 'big'}, so b (whatever) sends cast 'big' (whatever)!)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Wed Nov 08, 2006 11:09 am   
 
Zugg is considering putting in an option to allow this old zMUD behaviour.
_________________
Taz :)
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Nov 08, 2006 11:09 am   
 
Ah, I now see what you were doing before, Ggoss. This isn't actually a bug, although Zugg said he might change aliases so they have a zMUD compatiblity option. (Edit: You beat me to it Taz!)

Something like what darkspot posted is the 'right' way to do this in CMUD at the moment.
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Wed Nov 08, 2006 1:18 pm   
 
i hope it will change, the main reason why i have not bought Cmud yet is because it not as simple to write scripts anymore, Zmud is fairly simple to script and i must say i cannot see why i should change client when it involves learning stuff all over again, zmud is a very good product it is fast (i dont have any massive scripts or maps/DB) and it is easy to write scripts in.
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Wed Nov 08, 2006 4:59 pm   
 
Ok, I don't mind changing things, just its odd. I guess I should learn the correct way to do things, jsut been doing it this way for ever. Zmud was so lax on things. Now as far as i'm concerned I would not change cmud to be as easy going as zmud was, we can all learn to reprogram little things that will make things easier in the long run.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Nov 08, 2006 6:10 pm   
 
Morten, this is really a fault of zMUD more than CMUD. zMUD has several little kludges that have been added over the years for little features that people wanted or to fix bugs in an easy way. CMUD is written mostly from scratch, so the scripting engine is designed to work with all these things in mind and handle code correctly, unlike zMUD. You'll need to learn a few minor differences in the scripting and you'll really only end up converting your most complex scripts or the ones that should have never worked even in zMUD.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 08, 2006 6:17 pm   
 
Morten: you only think zMUD is "fairly simple to script" because you are used to it. zMUD scripting actually contains a bunch of complicated stuff that I call "wierdness", such as <> syntax and [] syntax and all sorts of stuff like that. CMUD gets rid of these "wierdnesses". *NEW* users who have not used zMUD before will find that CMUD makes more sense and is easier. It's only the zMUD users that will need to learn some new stuff. But trust me...you'll look back in a couple of years and try zMUD again and wonder how you ever used it instead of CMUD. Some people are already posting stuff in zMUD that annoys them after getting used to CMUD.

I suggest that you remember why you got zMUD in the first place. After all, why use zMUD when you can just use Telnet or some free client? You got zMUD because it was the best, fastest, and easiest to use. When you discover the features in CMUD that make it faster (local variables, compiled scripts), better (more customizeable user interface, docking, toolbars, packages) and easier (getting rid of zMUD wierdnesses), then you should be willing to learn a bit of new stuff in return.

As far as the auto-appending of arguments...this was something that was originally done in zMUD only because it worked that way back in the TinTin days. I've gotten email from many new zMUD users who don't understand why their extra text is getting appended. Many people think that this was really wierd behavior. That's why CMUD doesn't do it by default.

But yes, I'm considering an option to enable this, but it will be something that you must enable for each alias that you want this behavior for. It will be like the "Send to MUD" options for Macros. So it will be possible to do, and imported zMUD aliases will enable this option by default. But it's something you will have to think about. I don't want CMUD doing wierd stuff like this by default...I want people to think about it and make their scripts easier to understand and easier to share with other people.
Reply with quote
fwah
Beginner


Joined: 08 Nov 2006
Posts: 14

PostPosted: Wed Nov 08, 2006 8:17 pm   
 
Would it be possible to make a toggle option that makes it happen on all aliases like Zmud used to do? Auto-insert the extra stuff? I'm just so used to making new aliases on the fly and having to type in a bunch of extra stuff could be detrimental.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 08, 2006 9:08 pm   
 
No. I want people to understand what they are doing and think about it. If you want the arguments appended, then put %0 or %-1 or %params in the alias definition. Trust me, it will make it easier to understand your aliases and scripts years later when they have gotten more complicated.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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