PDA

View Full Version : XML Stuffs



Danical
07-22-2008, 03:46 AM
So Divid's player whipped this up for my cloak so I could always know what's in there without every having to actually look in the cloak.


before_dying{ untrace_var(:$_SERVERSTRING_) }
trace_var(:$_SERVERSTRING_, proc { |data|
if data =~ /<clearContainer id=['"]stow['"]\/>/
$cloakcontainer = data.scan(/<inv id=['"]stow['"]>[^<]*<a exist=['"][^'"]+['"] noun=['"][^'"]+['"]>[^<]*<\/a><\/inv>/).collect { |val| /noun=['"]([^'"]+)['"]/.match(val).captures[0].dup }
end
})

My question is, how in the hellballs do I do this for my other containers? I know it has something to do with the bolded part above but I can't for the life of me recreate this for, say, my backpack or jacket.

Shaelun
08-08-2008, 01:06 AM
Offhand, it looks as though SF has a stream devoted to whatever your STOW container is set to. It appears (and I stress appears) to be working off of that.

Try changing your stow container and see if that alters it. If so, recreating this behavior for another container would probably be a real bitch.

Stanley Burrell
08-08-2008, 01:12 AM
DO
BEEP
LOOP

Shaelun
08-08-2008, 01:50 AM
DO
BEEP
LOOP

My thoughts precisely.

Danical
08-12-2008, 05:02 PM
Offhand, it looks as though SF has a stream devoted to whatever your STOW container is set to. It appears (and I stress appears) to be working off of that.

Try changing your stow container and see if that alters it. If so, recreating this behavior for another container would probably be a real bitch.

Yeah, that's what I figured . . . I appreciate the info though!

----------------
Now playing: John Digweed - Kiss 100 FM (April 03, 2005) - John Digweed (http://www.foxytunes.com/artist/john+digweed/track/kiss+100+fm+(april+03%2c+2005)+-+john+digweed)
via FoxyTunes (http://www.foxytunes.com/signatunes/)

AestheticDeath
08-12-2008, 05:14 PM
might be able to do it offa sheath container or something like that

Danical
08-14-2008, 05:13 AM
Offhand, it looks as though SF has a stream devoted to whatever your STOW container is set to. It appears (and I stress appears) to be working off of that.

Try changing your stow container and see if that alters it. If so, recreating this behavior for another container would probably be a real bitch.

Alright, so it's definitely working off the stow stream. But I've found this for my coat.

<container id='36484904' title='Coat' target='#36484904' location='right'/><clearContainer id="36484904"/><inv id='36484904'>In the <a exist="36484904" noun="coat">coat</a>:</inv><inv id='36484904'> a <a exist="36484910" noun="badge">vaalorn-bound gold Adventurer's Guild badge</a></inv><inv id='36484904'> a <a exist="36484909" noun="ring">polished gold ring</a></inv><inv id='36484904'> a <a exist="36484908" noun="ring">narrow gold ring</a></inv><inv id='36484904'> a <a exist="36484907" noun="ring">faded gold ring</a></inv><inv id='36484904'> a <a exist="36484906" noun="emerald">dragonfire emerald</a></inv><inv id='36484904'> a <a exist="36484905" noun="baton">smoky topaz inset silver baton</a></inv>In the <a exist="36484904" noun="coat">leather coat</a> you see a a <a exist="36484910">gold badge</a>, a <a exist="36484909">polished gold ring</a>, a <a exist="36484908">narrow gold ring</a>, a <a exist="36484907">faded gold ring</a>, a <a exist="36484906">dragonfire emerald</a> and a <a exist="36484905">smoky topaz inset silver baton</a>.
<prompt time="1218704826">&gt;</prompt>

<deleteContainer id="36484904"/>You close a <a exist="36484904" noun="coat">thin tan leather coat</a>.


I'm guessing the 36484904 is where STOW normally goes. I know the number changes every time I login. However, would it be possible to capture this number upon startup and use it for the remainder of the time I'm logged in to work like STOW?