(New message)
Subject review (reverse sequence)
Posted by
Avariel
Portugal (55 posts) bio
Date
Wed 31 Jul 2002 01:48 PM (UTC) [ quote
]
Message
thank you, Nick
I'll probably gonna have some more questions as I try to do more complex alias :)
this reply will help me a lot.
have fun.
The Avariel Wind Lord top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 26 Jul 2002 10:57 PM (UTC) [ quote
]
Message
I just noticed this is the Jscript part of the forum, but the answer is very similar. Instead of "Execute" you would use "eval", like this:
eval ("afk_" + world.getvariable ("self") + " () ;");
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Nick Gammon
Australia (18,770 posts) bio
Forum Administrator
Date
Fri 26 Jul 2002 10:47 PM (UTC) [ quote
]
Message
Quote:
im trying to run alias inside script functions...
You can't call aliases from scripts, because of the possibility of an endless loop. Eg. alias A calls script B, script B calls alias A and so on.
However, what you can do is make a variable, eg.
variable XXX = "go north"
Then the alias uses the variable, eg.
alias YYY = "@xxx"
With "expand variables" set this would send "go north".
Then in your script you can also use the same variable, eg.
world.send world.getvariable ("XXX")
This would send "go north".
Quote:
ide like to know if it possible to set a function that runs afk_self function inside it.
You can do this with the VB "execute" command. eg.
Execute "call afk_" & world.getvariable ("self")
This tells VB to join "afk_" with the contents of variable "self" then execute "call afk_self" (whatever self is).
- Nick Gammon
www.gammon.com.au, www.mushclient.com top
Posted by
Avariel
Portugal (55 posts) bio
Date
Fri 26 Jul 2002 01:06 PM (UTC) [ quote
]
Message
i need help in 2 things.
1rst:
im trying to run alias inside script functions... dunno if thats possible but if it is id like to someone hepls me with sintax cus im not being able of doing it.
2nd:
i have a diferent function for each of my chars with the names like this
afk_<char_name_1>
afk_<char_name_2>
afk_<char_name_3>
when i connect to the mud i have a function that sets
self = <char_name>
ide like to know if it possible to set a function that runs afk_self function inside it... meaning that recognizes the variable set on connection and choses the right afk_* function. if its possible how do i do it.
thx.
The Avariel Wind Lord 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.
1,591 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )