[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Stat Roller

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Stat Roller
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sun 12 Dec 2004 07:53 PM (UTC)  quote  ]
Message
Ahem. You're in the wrong place, RoK isn't even a MUD, it has nothing to do with MUSHclient.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Pow   USA  (1 post)  [Biography] bio
Date Sun 12 Dec 2004 07:37 PM (UTC)  quote  ]

Amended on Sun 12 Dec 2004 09:52 PM (UTC) by Nick Gammon

Message
I really really need a stat roller for realms of kaos, if anyone could possibly help me out I would appreciate it tons!!!! My email is just_a_chic@hotmail.com and I have msn. Thank you a lot.

(edited to remove all caps)

Thank you, Pow!
[Go to top] top

Posted by Ntmsz   (1 post)  [Biography] bio
Date Fri 06 Jun 2003 09:47 PM (UTC)  quote  ]

Amended on Fri 06 Jun 2003 09:50 PM (UTC) by Ntmsz

Message
Hi, I have something much more simpler but I don't fully understand everything above, or have something quite different:


Strength: 14 (Hardy)
Dexterity: 14 (Nimble)
Constitution: 12 (Average)
Intelligence: 14 (Smart)
Wisdom: 15 (Thoughtful)
Charisma: 13 (Pretty)
Luck: 14 (Lucky)

I am experiencing this error message:
============================
There was a problem in script file "G:\Vault\Documents\Misc\OnStats.vbs":
==========================

Here is what I have come up with:

Trigger:
===============================================
^\s*(Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma|Luck)\s*(\d+) * $
===============================================

===============================================
Keep? (Y/N)
===============================================

OnStats:
===============================================
sub OnStats (strName, strLine, aryWildcards)

dim stat, start

' get stat (wildcards 1, 2)

stat = aryWildcards (1)
start = aryWildcards (2)

world.setvariable "stat_" & stat, start

end sub
==============================================

Thanks.
[Go to top] top

Posted by Demonsurfer   USA  (256 posts)  [Biography] bio
Date Fri 21 Feb 2003 09:43 PM (UTC)  quote  ]

Amended on Sun 02 Mar 2003 12:17 AM (UTC) by Demonsurfer

Message
that works too :)

how's it going?

--------

*sniff sniff* vers 3.33 far away?
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Fri 21 Feb 2003 09:37 PM (UTC)  quote  ]
Message
I think the simple solution would be to have another option:

"send to variable" where you then specify the variable name, as backwards compatibility is important.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Demonsurfer   USA  (256 posts)  [Biography] bio
Date Fri 21 Feb 2003 08:34 PM (UTC)  quote  ]
Message
just a thought.. I guess you'll need to make the label the default (for send to variable) if the new variable field is blank, to allow for existing people's scripts..
[Go to top] top

Posted by Demonsurfer   USA  (256 posts)  [Biography] bio
Date Tue 18 Feb 2003 10:24 PM (UTC)  quote  ]

Amended on Tue 18 Feb 2003 10:29 PM (UTC) by Demonsurfer

Message
Quote:
I think Demonsurfer is hanging out for that one. :)

hehe yup :)

..oh, and a new field for variable name instead of using label so 2 triggers/aliases can send to the same variable without having to add a script for one of them. :)
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Tue 18 Feb 2003 09:37 PM (UTC)  quote  ]
Message
The ability to set variables directly from an alias is something that is planned for the next version, I think Demonsurfer is hanging out for that one. :)

I think I considered doing what you said, but gave up because of the complexity and possible bugs.

I am looking into setting variables directly from an alias in the next day or so.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Mon 17 Feb 2003 06:21 AM (UTC)  quote  ]
Message
Hmm. I wasn't aware that internal commands did that. But again, as I said having a command that did that 'in' scripting makes no sense anyway. The only practical use is to directly execute an alias inside another alias or a trigger. If you are coding scripting anyway, then it is quite silly to not just use the commands you need directly. It is much easier to do 'world.note blah' than 'world.interpret "/world.note blah"'. Imho anyone dumb enough to try such deserves bugs. ;) lol

The only case anyone is really worried about is like:

alias: at *
send: attack %1

alias: fl *
send: flag %1
/setvariable "Mob", %1
at %1

The idea being to avoid what would require using a script, but frankly shouldn't. Some people think it is a bit nuts to 'require' scripting or multiple aliases/triggers just to set more than one variable as and example, or just to set one in the first place. This is the only instance where it is an issue.

Though.. Didn't you add direct setting using variable names of some sort into the actual trigger text? I seem to remember that you did or where going to, but if so then it certainly isn't in the normal help file ;) and I don't remember seeing it anyplace else in examples. If it does exist it is definitely an undocumented feature. lol

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sun 16 Feb 2003 10:40 PM (UTC)  quote  ]
Message
Hmmm - and if the thing being interpreted was something that called another script, even something like this?

world.Interpret "/world.note blah"

This would require another instance of the script engine to be created. I'm not saying it couldn't be done, but I think there would be places where you would get unexpected behaviour. Already MUSHclient defers things like executing scripts on an alias or trigger by queing them. I can imagine a case where if there was a world.Interpret function, a week later I would get forum posts showing how things were being executed out of sequence.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sun 16 Feb 2003 07:32 PM (UTC)  quote  ]

Amended on Sun 16 Feb 2003 07:35 PM (UTC) by Shadowfyr

Message
Hmm.. Well that is a potential issue, but this is a programming language we are dealing with and last I checked it was up to the coder to avoid those things. It is no different than someone accidentally creating an infinite loop in a for next statement in a sub. Both will cause a problem. After all, these are all similar issues:

1. a regexp that you forget to escape [ and ] in.
2. loops in scripts that have invalid exit code.
3. Ctrl-Enter treating (at least in one case I know of) the seperate lines not as explicit data to go to the mud, but rather as though you used a command seperator.

Using a world.interpret command 'could' present a problem and I would tend to agree that it would be a bad thing. However, as something that is processed in the 'send' field of the actual alias and can be turned off, safeguards could also be set in place to prevent it calling itself. In theory..

You could even track such inline events so that each alias called got added to a list and if at any point the same alias name came up a dialog would appear to the effect that 'a recursive call was detected and processing of the alias {name here} was terminated.', along with an error window listing the names in the list and thus how the recursion happened. Since such internal calling would be disabled unless explicitly asked for, the overhead for normal aliases and triggers that didn't use the feature should be no more than the execution time of a single 'if then'.

Actually.. The same thing could be done through world.interpret, but unless it checked to see if each command was an alias before placing it in the list, you would have to track every command. However, since the point was to avoid having to duplicate the function of an alias by calling a scipt to handle the command, such a script side method is a bit silly.

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sat 15 Feb 2003 10:49 PM (UTC)  quote  ]
Message
Quote:

It probably wouldn't hurt if aliases in mushclient accepted /{command} syntax and processed through the normal command interpreter (or at least the part that handles inline commands)


I'm worried about indefinite loops when you do that. eg.

Alias: X
Script: DoX

sub DoX (line, output, wildcards)

world.Interpret "X"

end sub

In this case the player types X which calls a script, the script does the (currently non-existent) Interpret function to pass the command X to the command interpreter, this calls the script, which then does X again, and so on, until the stack runs out.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Demonsurfer   USA  (256 posts)  [Biography] bio
Date Tue 11 Feb 2003 06:40 PM (UTC)  quote  ]
Message
watch this thread

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2274&page=999999

and see what Nick replies.. :)
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Tue 11 Feb 2003 06:37 PM (UTC)  quote  ]
Message
Well Nosferat. Being able to do what you want is on the list and the next version 'may' include it. It is quite likely that mushclient will eventually include such, even if not in the very next version. Have some patients. ;)

Oh. And most clients that allow inline variable setting don't use syntax like $var TARGET %1. It also looks to me like an inline 'script', which means like it or not you are a scripter. ;) lol Clients that use such inlined stuff btw, are by definition slower, because they essentially process all aliases through scripting to look for commands, before actually sending any text to the mud.

It probably wouldn't hurt if aliases in mushclient accepted /{command} syntax and processed through the normal command interpreter (or at least the part that handles inline commands), but if it did, to avoid slowing the client, there would likely need to be an 'Process inline scripts' option for them that you could turn on as needed. Otherwise, the result of adding such a thing would slow down all aliased commands. Whether Nick thinks an option to enable such functionality is reasonable though... ;)

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Nosferat   (3 posts)  [Biography] bio
Date Tue 11 Feb 2003 06:04 PM (UTC)  quote  ]
Message
Hehe...Neva...

My point is...the client should allow me to easily manipulate my variables...Thankyou for your help everyone...I have found another client...I'm not sure if it's as fast as MUSH client but in my new client I can change my variables from aliases like this

b dragon

$var TARGET %1
backstab %1

Quick and easy...the $var command works in triggers also...if I find this new client to be as fast as MUSH client I won't need to come back and learn how to script to make up for an incomplete mud client...I can see scripting for more complex things...but I won't learn to script to control variables...I'm a MUDder not a programmer Jim!
[Go to top] 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.


10,166 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]