Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Internal World Variables

Internal World Variables

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #15 on Sun 14 Apr 2002 01:07 AM (UTC)
Message
Your triggers have used 8.6 seconds out of 4800 seconds? or, 0.001792% CPU utilisation of a P166. Doesn't seem so bad to me ;)
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #16 on Sun 14 Apr 2002 01:08 AM (UTC)
Message
...or use Nick's extensive documentation to build a single trigger. It COULD be done, and you would end up with the hours in one wild card, minutes in another, and seconds in the last...

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 #17 on Sun 14 Apr 2002 01:21 AM (UTC)
Message
Actually, Dave, for the most part, I've just been idle on the mud, so that may not be reflective of performce when I NEED performance... :)

The number of aliases seem to be what's pushing the line most. Once in a while my spell queue will mess up. I'll have it paused, but something in the game will trigger script to add more spells, and my variable list increases dramatically, since each spell in the queue requires about 4 variables in my script. It only takes about 5 spells in the queue, and I'll notice a dramatic slow down. 10 or more spells, and the stall is intollerable.

Also, i don't know if trigger time increases as more hits are made... If so, the example I posted was very innaccurate, since I was idling. When I am out fighting solo, the trigger fires go up dramatically, and in a party they go even higher... and that's when I need the client to be going as fast as it can, cause I'm often in danger. :)

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  (23,165 posts)  Bio   Forum Administrator
Date Reply #18 on Sun 14 Apr 2002 11:52 AM (UTC)
Message
Quote:

Regarding the save file prompt, I concur. I will hit the save icon, click the disconnect icon, then click the "x" close window icon, and will be prompted to save updated variables, despite not receiving any output from the MUD in between those actions. I do not run any script on world close or disconnect.


Are you using MXP? MXP sets variables like roomname, hit points etc. Timers? Timers might set variables.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #19 on Sun 14 Apr 2002 07:38 PM (UTC)

Amended on Sun 14 Apr 2002 07:43 PM (UTC) by Shadowfyr

Message
In the case of:

The next reboot is scheduled for 19:05 CEST (GMT+1) on Sunday (in 15h 13m 2s).

using:

The next reboot is scheduled for * on * \(in (\d+)(d)?(\d+)(h)?(\d+)(m)?(\d+)(s)\)\.

If it only finds some of the matches does it still return the same number of wildcards or only the number found? And even assuming it did, the result would still be worse than what I already have, since the idea is to get the number values (if they exist), but not have to check to find out 'which' number it actually found. If everything in a () gets shoved into a wildcard and there is no way to 'fix' the number of them passed to the script, then it only makes things more complex rather than simpler. I just don't see any way to do it if the information you are retrieving is of a nature that you cannot easilly distinguish it from other items or you want to avoid the need to distinguish them at all. Fact that I find a bit annoying. ;)

Because of this I currently use:
The next reboot is scheduled for * on * (in *).

I would prefer a more efficient way, but it doesn't appear that one is possible. As for Magnum's comment about slowing down the client... I am not sure how placing a value into a variable instead of, or at the same time as, a wildcard would be significantly slower. Variables themselves do seem to create extra overhead when you have too many for some reason (you need to look into this), but the actual act of puting the value into a variable instead of the wildcards should be only the number of clock cycles used to preform a check to see if it is * or %, retrieve the name after the % if it is there and set a variable with that name. The code already has to do most of the things needed to make it work, just to corectly figure out what needs to be put in all the * locations. Frankly I am sort of surprised regular expressions in general (if not in this client) don't already have provisions for doing it, except that most places they are used is not in retrieval of values, but simply in identification of a match.

However... Assuming that what I indicated in my example is possible in general, i.e. (\d*), then it does solve some of the more general problems when you do know what is likely to be popping up and is definitely nice to know about.

Now as to the very last post about variable saving... Nope. It doesn't matter if MXP is active or not, it still insists that variables have not been saved.

I turned MXP off again on mine because my work around turned out to not work quite as well as I thought it did. lol Guess I will just have to try to convince the people that recently took over admin of the mud to make it MXP complient. ;) Not bloody likely though... However, even with it turned off it still does not recognize that the variables are saved.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #20 on Sun 14 Apr 2002 09:57 PM (UTC)

Amended on Mon 15 Apr 2002 06:47 AM (UTC) by Nick Gammon

Message
Quote:


The next reboot is scheduled for * on * \(in (\d+)(d)?(\d+)(h)?(\d+)(m)?(\d+)(s)\)\.



A quick test with my earlier example reveals that the wildcards are returned even if empty. In other words, you would get 8 back. Mind you, if you are using regular expressions your example is a bit wrong in the early bit. It should be ...


The next reboot is scheduled for (.+) on (.+) \(in (\d+)(d)?(\d+)(h)?(\d+)(m)?(\d+)(s)?\)\.


(In other words the asterisks on their own won't work).

Now you are up to 10 wildcards which is pushing the limit a bit, however you don't really need the letters d, h, m and s returned, as they are fixed. Thus it could be:


The next reboot is scheduled for (.+) on (.+) \(in (\d+)d?(\d+)h?(\d+)m?(\d+)s?\)\.


That ought to work, then wildcard 3 is always the day number, wildcard 4 the hour number, wildcard 5 the minute number and wildcard 7 the second number. No fiddling required.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #21 on Mon 15 Apr 2002 06:33 AM (UTC)
Message
Yes, I do (and am probably famous on the mud for it) use a timer that fires once an hour:

[bs]: Magnum curses negative exp!

No MXP.

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  (23,165 posts)  Bio   Forum Administrator
Date Reply #22 on Mon 15 Apr 2002 06:47 AM (UTC)
Message
Can't really explain it then. Either a bug, or you are setting a variable somewhere without realising it. :)

Maybe a diff on the two world files would show what it was. Or, write a little script that exports all variables to a text file, then:

1. Run the script, giving file1
2. Do whatever you do, disconnect etc.
3. Run the script, giving file2
4. Compare the two files

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #23 on Mon 15 Apr 2002 05:55 PM (UTC)
Message
On second thought, I should point out, my timer does not update (or even use) any mushclient variables, it simpy sends an output line to the mud, nothing fancy. (Doesn't even call script).

I'll consider your suggestion later... Don't feel like logging off now. :)

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #24 on Mon 15 Apr 2002 10:31 PM (UTC)

Amended on Mon 15 Apr 2002 10:37 PM (UTC) by Shadowfyr

Message
>The next reboot is scheduled for (.+) on (.+) \(in (\d+)d?(\d+)h?(\d+)m?(\d+)s?\)\.

Hmm. Nice to know it does pass the same number. Just checked the vbscript help I have and looks like should work (assuming the ?s will correctly ditch the letters). Makes things a bit simpler that way. I will try it and see.

As to the variable thing.. The only thing that would be setting variables is my timer. Most everything including scripting though is diabled/non-functional when the client is not actually online and since the timer only ticks every minute the odds of my always hitting close just after saveing and as it executes is extremely unlikely. I think it is definitely a bug.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #25 on Mon 15 Apr 2002 11:08 PM (UTC)
Message
I have added the saving problem as bug #462.

- 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.


74,839 views.

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

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.