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
➜ General
➜ MUSHclient version 4?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
4 5
Posted by
| Linda
Sweden (164 posts) Bio
|
Date
| Reply #45 on Sat 18 Dec 2004 07:34 PM (UTC) |
Message
|
Quote: I just want to point out that this particular issue is available right now, in MUSHclient. Just select Window -> New Window, and you get a copy of the current world window including a separate input area.
Now I agree it doesn't filter the output text, you see the same things as in the original window (although you can pause it at the message from the other player you are replying to). However you shouldn't be losing half-typed poses even now.
True, but without the filtering, it doesn't really cut back on the chaos any, or help you avoid miscomms by ensuring that anything you type in that window goes to its intended source. I've tried it a couple of times, but found that it doesn't really help that much in my situation because of that limitation. Its also, like the notepad windows, easy to lose track of.
But certainly, it doesn't fit in under doing minor fixes before 4 is released. It just turned into a bit of a discussion of this feature once again since you wondered why the notepad solution doesn't cut it. :)
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #46 on Sat 18 Dec 2004 08:07 PM (UTC) |
Message
| That's fine, just checking you knew about it.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Gore
(207 posts) Bio
|
Date
| Reply #47 on Sun 19 Dec 2004 05:15 PM (UTC) |
Message
| Doh, is there anychance of deci/centi/millisecond interval timers being implemented in version 4?
And the tabbed windows look wicked good, thanks Nick :D | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #48 on Sun 19 Dec 2004 06:52 PM (UTC) |
Message
| You can probably do smaller timers in Lua.
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4956&page=999999
Actually... I dont know. The Lua manual only talks about seconds. But if you could get the OS to return time in windows (which is the number of milliseconds since 1970 or whatever) then you should be able to do it. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #49 on Sun 19 Dec 2004 07:44 PM (UTC) |
Message
| I was toying with the idea of timer of less than a second. I suppose everyone's keen? Trouble is the various interfaces that assume a second granularity, but it can probably be worked around. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Gore
(207 posts) Bio
|
Date
| Reply #50 on Sun 19 Dec 2004 10:00 PM (UTC) |
Message
| well, there's built in variables that has the number of seconds (or milliseconds rather) from midnight, so you could time things in milliseconds using that
But - you can't do XXX.. wait 300 milliseconds then do XXX..
Like, say, you have a trigger that does
Sub Eat_Herb (a,b,c)
if herbbalance = 1 then
World.Send "eat herb"
end if
End Sub
and this sub fires on "You have recovered balance" & "You may eat another plant"
So, you don't want to double eat and you get the following output:
2705h, 3290m ex-
You may eat another plant.
2705h, 3290m ex-
You have recovered balance on all limbs.
2705h, 3290m ex-
then you'd double eat.. with a millisecond timer I wouldn't have to worry about that sort of thing.
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #51 on Sun 19 Dec 2004 10:20 PM (UTC) |
Message
| I don't quite understand that bit. Where do timers come into this example?
To save double eating can't you just store the fact that you have eaten something in a variable, and clear it when an appropriate message arrives? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #52 on Sun 19 Dec 2004 10:36 PM (UTC) |
Message
| Anyway, before I get bogged down with sub-second timers, I have released version 3.60, which has gone from a few minor updates to 22 enhancements.
So, not quite ready to rebadge as version 4 yet.
Interestingly, one of the fixes was a fix to a previous improvement. Just shows how it is hard to get these things perfect.
In 3.57 I added a change to the notepad windows, on request, so that the title of the window would be offered when you saved it. Seemed a simple idea. However in the wisdom of the Windows programmers, certain characters in a document title stop it from saving. It is not as if you get the dialog box, and have to change a few things, you don't even get that.
It is this sort of thing that makes me grind my teeth when using Windows. I have an Access database that does that. One of the forms, a while ago I changed it, and now when I use it, it says "you have changed it, do you want to save the changes?". I say "yes". Then I close it. It says "you have changed it, do you want to save the changes?". I say "yes". And so on. Eventually I close it without saving the changes. Kind of annoying. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Gore
(207 posts) Bio
|
Date
| Reply #53 on Mon 20 Dec 2004 11:26 PM (UTC) Amended on Wed 22 Dec 2004 04:32 AM (UTC) by Nick Gammon
|
Message
| Doh, sorry about my previous post on this thread.
Basically I don't say
dim herbbalance
Sub Eat_herb (a,b,c)
World.Send "eat herb"
herbbalance = 0
End Sub
I do:
dim herbbalance ' Variable
Sub herbbalance_on (a,b,c) ' Sub to turn herbbalance on
herbbalance = 1
End Sub
Sub herbbalance_off (a,b,c) ' Sub to turn herbbalance off
herbbalance = 0 ' Called on the trigger:
End Sub ' ^You have eaten an herb\.$
Sub Eat_herb (a,b,c) ' Sub to eat an herb
If herbbalance = 1 then
World.Send "eat herb"
End If
End Sub
That's how it do it currently, and er, to simplify (not exactly how I do it, but for simplicity's sake) things I call eat_herb on balance/eq/etc.
So, if I get balance and eq simultaneously, I do eat_herb twice, and I overeat.
Now, if there were millisecond interval timers, I could do..
<timers>
<timer name="anti_double_eat" script="imaginary_herbbalance_on" second=".3" >
</timer>
</timers>
dim herbbalance ' Variable
dim fake_herbbalance
Sub herbbalance_on (a,b,c) ' Sub to turn herbbalance on
herbbalance = 1
End Sub
Sub herbbalance_off (a,b,c) ' Sub to turn herbbalance off
herbbalance = 0 ' Called on the trigger:
End Sub ' ^You have eaten an herb\.$
Sub imaginary_herbbalance_on (a,b,c)
fake_herbbalance = 1
End Sub
Sub Eat_herb (a,b,c) ' Sub to eat an herb
If fake_herbbalance = 1 AND herbbalance = 1 then
World.Send "eat herb"
fake_herbbalance = 0
World.EnableTimer "anti_double_eat", 1
End If
End Sub
If I did it that way, then the fake balance variable would be turned to false, then be turned on 300 milliseconds later, enough so that I don't double eat on the chance that I call this sub twice. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #54 on Wed 22 Dec 2004 04:41 AM (UTC) |
Message
|
2705h, 3290m ex-
You may eat another plant.
2705h, 3290m ex-
You have recovered balance on all limbs.
2705h, 3290m ex-
Why don't you turn on the "I have eaten" flag when you send "eat herb"? After all, you know you have just done it.
So you could do something like this:
if not just_eaten then
Send "eat herb"
just_eaten = true
end -- if
I suppose the problem here is that if you get two triggers in quick succession you might clear the flag twice. Well, you can find when a trigger matched (with GetTriggerInfo).
Now it doesn't matter how quickly the messages arrive, you instantly set a flag the moment you eat. So, if the second trigger fires it doesn't eat again.
You could also store the time you just ate (when sending "eat herb"). Then you don't clear the "just eaten" flag until a trigger arrives at least a second or two afterwards.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #55 on Wed 22 Dec 2004 04:43 AM (UTC) |
Message
|
Quote:
Doh, is there anychance of deci/centi/millisecond interval timers being implemented in version 4?
Regardless of your problem above, and whether or not the timers will solve it, I have indeed been working on sub-second timers in version 3.61. A bit more testing and I can release it for you to play with. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Gore
(207 posts) Bio
|
Date
| Reply #56 on Mon 27 Dec 2004 10:05 PM (UTC) |
Message
| |
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #57 on Fri 08 Jul 2005 01:30 AM (UTC) |
Message
| I was looking for a way to get the system time down to the millisecond (similar to gettimeofday on Linux, perhaps), but I have not yet found a way to do this either in Lua or in MUSHclient. I have C code for a gettimeofday function, and I might be able to wedge it into Lua, if I can figure out the interface. If you'd like to include the capability to get time down the millisecond resolution in version 4, I'd be more than happy to share my function for grabbing the seconds/milliseconds time. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #58 on Fri 08 Jul 2005 10:24 AM (UTC) |
Message
| Hmm, why would you want to do that? And wouldn't MC have to check all the timers each millisecond to see if they should fire or not, thus making it quite slow? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #59 on Fri 08 Jul 2005 01:30 PM (UTC) |
Message
| I'm not talking about timers. I want to grab the system time, including the current milliseconds, so I can time certain events between prompts. As all of the date/time functions are currently coded, I can only go down to the resolution of seconds. | 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.
150,104 views.
This is page 4, subject is 5 pages long:
1
2
3
4 5
It is now over 60 days since the last post. This thread is closed.
Refresh page
top