The last line of the Flynd description is missing an action to finish the gerund phrase modifying Flynd.
This is also present in the Retromud actual site.
-Xana
The last line of the Flynd description is missing an action to finish the gerund phrase modifying Flynd.
This is also present in the Retromud actual site.
-Xana
i'm pretty sure comcreate is the only way, but there has to be some method of closing IE when the call is complete (or even just using firefox, which doesn't suffer from mem leaks nearly as much as IE does X-x)
EDIT: It looks like madSimon has fixed the leak issue for sure. Now let's start cleaning up that godawful output! ;)
The best way to do it is to simplify it. Lots of guilds get a combat skill, so just tag it as a combat skill.
Here's a slightly more readable version that also addresses the comcreate memory leak and the variable definition syntax. What it doesn't address is the ugly output, but we may need to think about the input as well.
wikiexits
#VA wikiprogress 1
#VA wikiobject %comcreate("InternetExplorer.Application")
#VA wikiurl "http://retrowiki.wikidot.com/world-exits"
#CALL @wikiobject.Navigate(@wikiurl)
#ECHO Looking for Wiki exits...
wikicheck 0
wikicheck
#VA wikitimeout 25
#IF (!@wikiobject || %1 > @wikitimeout)
{
#ECHO Timed out!
#VA wikiprogress 0
#VA wikiobject 0
}
{
#IF (@wikiobject.ReadyState == 4)
{
#VA wikiprogress 0
#ECHO {%copy(@wikiobject.document.body.innertext, %match(@wikiobject.document.body.innertext, "collected data"), %eval(%match(@wikiobject.document.body.innertext, "dates are in utc") - %match(@wikiobject.document.body.innertext, "collected data")))}
#CALL @wikiobject.Quit
#ALARM {+2} {#VA wikiobject 0}
}
{
#ALARM {+1} {wikicheck %eval(%1 + 1)}
}
}
Hi again,
The world exits interface discussion page didn't seem appropriate, so I made this new thread to talk about more general scripting stuff.
In a similar theme to the world exits I posted before, I also have almost the same script to check the time on Sosel.
It will tell you the time in Sosel hours, and also how long (in real life Earth minutes) till the next sunrise or sunset.
From what I have observed it is reasonably accurate. Again, it's a terrible hack and comments are welcome.
#ALIAS soseltime {timeprogress = 1
#VARIABLE timeobject %comcreate( "InternetExplorer.Application")
timeurl="http://70.86.15.74:3003/cgi/calendar?=fire"
#CALL @timeobject.Navigate(@timeurl)
#ECHO Looking for Sosel time…
timecheck 0}
#ALIAS timecheck {timeout=15
#IF {!@timeobject || %1 > @timeout} {#ECHO Timed out!
timeprogress=0
timeobject=0} {#IF {@timeobject.ReadyState==4} {timeprogress=0
#ECHO It is %copy( @timeobject.document.body.innertext, 24, 5) on Sosel.
soselminutes = %eval( %copy( @timeobject.document.body.innertext, 24, 2)*88+%copy( @timeobject.document.body.innertext, 27, 2))
#IF (@soselminutes < 235) {#ECHO It is %round( (235-@soselminutes)/12) minutes till sunrise.} {#IF (@soselminutes<620) {#ECHO It is %round( (620-@soselminutes)/12) minutes till sunset.} {#ECHO It is %round( (1035-@soselminutes)/12) minutes till sunrise.}}
timeobject=0} {#ALARM {+1} {timecheck %eval( %1+1)}}}}
Yeah, it's nasty. When I was looking at the original script from the eq database I had to remove most of the comments, error checking and formatting just to figure out how it worked.
The only part I'm still not happy with is using almost the same %match command 3 times to find the right piece of text. If anyone knows a shorter way to do that, let me know. I think maybe the regex command, but not sure how it works.
Since the output is not very pretty with this method of capturing the web page as text, I don't think it's worth writing a more friendly script right now.
Also, no, I don't know any other way than using comcreate. I'm not a programmer, I'm not even sure why any of this works. I'm just good at hacking up what other people have done.
It's bad coding to use the a=b syntax, since some of us (cough cough me) disable that in their client so as to not accidentally make variables.
Also yeah, you'll need to clean up that syntax or it'll be confusing :P
EDIT: Also, what about us crazies who don't want to comcreate ie (comcreate ie creates a memory leak that eventually makes zmud unable to function - that's the biggest beef I had with froggy's db macros)
Wow. Mystery solved. Cmud prefers the syntax
#IF (expression) {true-command} {false-command}
I changed the brackets to parenthesis and it worked like a charm. Formatting could use some love, but it works.
Output:
Looking for Wiki exits…
Collected data
PlanetShaftStatueShip
Cryptgydlag
Perdow6keytoh
Raji9bioesh
Sosel0tembar
Welstar7,SPInep
Wysoom8alt
DateJun-24Jun-24Jun-24
Trying to use it on Cmud and I instantly get
Looking for Wiki exits…
Timed out!
Going to play with it a bit and see if I can figure out what the issue is. It's obviously not timing out, so it appears to be having trouble instantiating the wikiobject variable.
Cool! I haven’t been able to test it because the %comcreate function fails in Wine, but it looks very nice.
Hi guys,
I just made a hack Zmud script to read the world exits on the web page.
It works for me is all I can say. If someone else tries it, let me know how it goes.
It is based on (is almost a direct copy of) the eq database script from Froggy.
#ALIAS wikiexits {wikiprogress = 1
#VARIABLE wikiobject %comcreate( "InternetExplorer.Application")
wikiurl="http://retrowiki.wikidot.com/world-exits"
#CALL @wikiobject.Navigate(@wikiurl)
#ECHO Looking for Wiki exits…
wikicheck 0}
#ALIAS wikicheck {wikitimeout=25
#IF {!@wikiobject || %1 > @wikitimeout} {#ECHO Timed out!
wikiprogress=0
wikiobject=0} {#IF {@wikiobject.ReadyState==4} {wikiprogress=0
#ECHO {%copy( @wikiobject.document.body.innertext, %match( @wikiobject.document.body.innertext, "collected data"), %eval( %match( @wikiobject.document.body.innertext, "dates are in utc") - %match( @wikiobject.document.body.innertext, "collected data")))}
wikiobject=0} {#ALARM {+1} {wikicheck %eval( %1+1)}}}}
Yeah. There’s enough of them going around on news and the channels, and it’d be a pity to have them all disappear from there.
I transcribed "help guild fighter" into the fighter page here to see what it might look like. Not necessarily in love with the layout as is, but I think it does make the wiki a bit more robust than just going to the retromud site.
What's the point of this page? To post real recipes?
I'd thought about it bit it didn't seem to be worth the effort.
It is possible, but a really general solution would be tricky. Do you have a specific idea?
I don't suppose it's even remotely possible to create a program to update the wiki through a script from within the MUD?
I'd do it, but my schedule's too erratic, and my only see-in-all-light character lives on sosel.
I could update the world exits for Crypt pretty much every day. Wysoom too, if needed.
I kind of like the current layout. It is indeed not parser-friendly, but it looks nice for people who just load the page in a browser.
I don’t know zMUD at all; my opinion in the following is based on browsing its language reference. I see three options:
By the way, I had another look at grabbing the page’s source code (rather more easily parsed than the XHTML). It’s feasible, but it would require making at least two HTTP requests and since I’m on a flaky connection right now, I’ve begun liking the XSLT approach. ^^
P.S. When you’ve got the code for zMUD, be sure to put it on the page. ;)