Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
psyborg
Beginner


Joined: 12 May 2003
Posts: 24

PostPosted: Tue Jun 10, 2003 8:06 pm   

HTML stripping?
 
ok, I am having problems with a capture from Dragonrealms. Using the GSw trigger, you can get weather/time/event updates. It is also used for other special formatting (like "monospace") Anyway, I get this from the server...if I watch the raw input. (turn the GSL Emulation off)

GSw00008<panelData id="weather"><weatherdata>1001109010</weatherdata></panelData>
GSw00008<panelData id="weather"><lineone>40th day of Moliko the Balance</lineone><linetwo>Year of the Bronze Wyvern</linetwo><linethree>372 A.V.</linethree></panelData>

When I use the following trigger:

#TRIGGER {w} {#win status %gsl( w)} "" {gsl}

I get the output that looks like this...

000081001109010
0000840th day of Moliko the BalanceYear of the Bronze Wyvern372 A.V.

If I try putting it into a variable, I get something similar. So, my question is, how do I get it to "show" the input in another window without stripping the data from it?
Reply with quote
psyborg
Beginner


Joined: 12 May 2003
Posts: 24

PostPosted: Tue Jun 10, 2003 8:11 pm   
 
oh, and here was the actual output if I save it to a variable...

00008panelData id=weatherweatherdata1001210110/weatherdata/panelData

it strips out all the '<' and '>' from the output.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Tue Jun 10, 2003 9:06 pm   
 
To simply record all of that data:

#TRIGGER {w} {#SHOW %gsl(w);#CAPTURE gsl;#GAG} "" {gsl}

I've been trying to work with that string of data, but haven't figured out the weather patterns. I'm currently using this script:

quote:

#CLASS {Weather}
#TRIGGER {w} {#IF {%copy( %gsl( w), 7, 9)="panelData"} {#IF {%copy( %gsl( w), 31, 11)="weatherdata"} {#IF {%copy( %gsl( w), 48, 7)=weather} {#VAR Weather1 "";#VAR Weather2 "";#VAR Weather3 %copy( %gsl( w), 43, 3)} {#VAR Weather1 %copy( %gsl( w), 43, 5);#VAR Weather2 %copy( %gsl( w), 48, 2);#VAR Weather3 %copy( %gsl( w), 50, 3)}}} {#IF {%copy( %gsl( w), 7, 12)="output class"} {} {#SH {~*~*~*Unrecognized ~%gsl~(w~)~: %gsl( w)~;%time( HH:MM:SS)}}}} "" {gsl}
#WATCH @Weather1
#WATCH @Weather2
#WATCH @Weather3
#CLASS 0

I currently have it set to just watch on the Debugger Window, but you can set it to capture the data with the current time as it comes in and stuff.

This pretty much breaks it down, so far as I can tell. Weather1 (which should probably be 2 strings) tells where the sun is (sunrise, high noon, etc) and the weather (cloudy, raining, etc). Weather2 states the time to nearest Anlas (00 is The Anlas of Anduwen). I'm baffled what Weather3 is, but if you're indoors, that's all you get. If you can decode that string, I could use it to create a pictoral panel, like the one in eScape.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net