Gammon Forum
Entire forum
MUSHclient
General
Mob Variable
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Abaddon
(3 posts) bio
|
Date
| Fri 05 Jul 2002 01:45 PM (UTC) |
Message
| id like to shorten things. since im a mage in such mud. id like to shorten the commands
on ordering my summoned mobs. in zmud i can make things like
here's some output i do in zmud...
60H 124M 78V [0] > npet bodak
60H 124M 78V [0] > o smile
60H 124M 78V [0] > The Bodak smiles happily.
60H 124M 78V [0] > npet succubus
60H 124M 78V [0] > o eat bread
60H 124M 78V [0] > The Succubus eats a loaf of bread.
the 'npet' is my new pet alias that sets the pet variable for different mob names.
the 'o' alias is to shorten the order @mob
in zmud i do it like this...
alias: npet
send : #var pet (sets a value for variable pet)
alias: o
send : order @mob (orders the mob)
also...
id like to know if getting the variables on macros is possible on mushclient?
like if i press 'F5" it sends...
'order @mob rescue abaddon'
sorry if i didnt have the time to scan all the posts. if anyone have a free time to help me at this. thanks in advance. by learning this i think i can have a better understanding now at variables in mushclient. | top |
|
Posted by
| Shadowfyr
USA (1,786 posts) bio
|
Date
| Reply #1 on Fri 05 Jul 2002 05:33 PM (UTC) |
Message
| Ran into a similar problem recently.. Sadly while gammon added direct setting of variables in triggers, setting them in aliases is still not possible without using a script (inconvenient of all you are trying to do is set one variable). :p Worse, placing /world.setvariable "mob", %1 won't work either since the output from aliases is never processed prior to sending it (though I think macros do/did allow this??)... How about some consistancy here Gammon? lol
What you need to do is use notepad to create a file containing the following:
sub Setname(aliasname, output, wildcards)
world.setvariable "mob", wildcards(1)
end sub
Save this file as a .vbs, but make sure to use "" or notepad will save it as file.vbs.txt. :p
Once you have this file you can turn on scripting, set the type to vbscript and point the program at the file you just created. Then just add a label and the new script name 'Setname' to the alias you use and each time you use it the variable should be set. ;)
Oh and to Gammon again... I thought several times of trying to create something that could 'simulate' zmud scripting for those making a switch, but this is one good example of why it will likely never be possible. :p Unless I am mistaken, even if you could write a plugin script that could parse the zmud code and generate a new script that duplicates it... is there a way to then auto-load it from the same script? Some stuf can simply be run in an true emulation, but things like creating a trigger that also contains a script... Hmm.. Gotta think about it a bit. It may not be worth it. Though it would probably (like MXP under zmud) be more stable as a mushclient plugin. lol | top |
|
Posted by
| Magnum
Canada (580 posts) bio
|
Date
| Reply #2 on Fri 05 Jul 2002 06:15 PM (UTC) |
Message
| |
Posted by
| Shadowfyr
USA (1,786 posts) bio
|
Date
| Reply #3 on Fri 05 Jul 2002 06:26 PM (UTC) |
Message
| Ok. Thanks Magnum. Though looking at zmuds stuff.. There are still serous issues with trying to emulate it. Not the least of which is things mushclient doesn't currently support like 'buttons'. Maybe I will work on it maybe not... Hard to decide. :p | top |
|
Posted by
| Abaddon
(3 posts) bio
|
Date
| Reply #4 on Sun 07 Jul 2002 10:14 AM (UTC) |
Message
| thanks for the post...
i can now set values for the variables.
the problem is now i still cant get it right calling
even in the aliases...
easy if it is called like...
alias: b *
send: backstab @mob
but...
alias: o *
send : order @mob %1
still it doesnt work. only works at first like
> o smile
send: order succubus smile
>the succubus smiles happily.
problem now is the smile is now the new value of the variable...
> o smile
send: order smile smile
>huh?
alias: o *
send: order @mob ????? <--- no idea
is there a cure for this? :)
pls help me again. | top |
|
Posted by
| Magnum
Canada (580 posts) bio
|
Date
| Reply #5 on Sun 07 Jul 2002 04:23 PM (UTC) |
Message
| Make sure you have the "Expand Variables" box checked within that alias' configuration form, in order to have MUSHclient replace "@Mob" with the value stored in that variable.
If that box is checked, this should work:
alias: o *
send : order @mob %1
|
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | top |
|
Posted by
| Magnum
Canada (580 posts) bio
|
Date
| Reply #6 on Sun 07 Jul 2002 04:27 PM (UTC) |
Message
| Oh, if you are still having problems, highlight the alias on your list of aliases screen, and press the "copy" button, then paste the data here in your message, so we can see the exact details of your alias. (You have to be using one of the newer versions to do this). |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #7 on Sun 07 Jul 2002 11:48 PM (UTC) |
Message
| Sounds to me like you are using the same script for both aliases. The "npet" one wants to use the script Shadowfyr suggested, the "o" one doesn't. Otherwise you would get the exact effect you describe. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Abaddon
(3 posts) bio
|
Date
| Reply #8 on Tue 16 Jul 2002 02:07 PM (UTC) |
Message
| thanks to all.
figured it all out now.
hope calling of variables can be done
at macros too.
thanks again. | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #9 on Wed 17 Jul 2002 08:11 AM (UTC) |
Message
| Macro output is evaluated for alias expansion, so a macro can generate a word, the alias catches that word, and then the alias expands the variables.
eg. F4 could generate "backstabmob-blah-blah"
Then you make an alias that matches on "backstabmob-blah-blah" and do the variable expansion there. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,764 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.