|
Got a documentation page up for how to use the WebServer access functions in Furbot, and made a couple of minor adjustments to the coding of the system. There was apparently a bug, or quirk, in the server command parsing switch where if you got a command from the server in which there was no native means of decoding, you were out of luck. Well that's been fixed, however, it's OFF by default. You can turn it on either with the special variable [$PROCESS_OTHER_COMMANDS], just set that to TRUE, or you can enable it under the advanced bot settings. Note that I do NOT recommand that you run the bot with that enabled all the time, hence it's OFF by default, because all the unhandled commands are passed to the trigger processor, like sounds, play music, the Eight triggers, ... Also made a modification to the WolfScript command FURCTOINT, if you pass it a second parameter of TRUE, it will decode the passed string in Base220 instead of Base95. This was also important because you can now do something like this: Trigger Name: Process Object Manifests Furcadia sends command {>} No Additional Conditions. THEN: $ Begin Wolfscript: (1) // decoding object manifests &newvar #message &mid(&getvar(message) 2) &newvar #posx &newvar #posy &newvar #count &newvar #object &newvar #loop &len(#message) &newvar #results {Objects: } &newvar #temp &div #loop 6 &for #index=1 to #loop &set #posx &furctoint(&mid(#message 1 2) true) &mul #posx 2 &set #posy &furctoint(&mid(#message 3 2) true) &set #object &furctoint(&mid(#message 5 2) true) &set #message &mid(#message 7) &set #count #posy &div #count 1000 &set #count &int(#count) &set #temp #count &mul #temp 1000 &sub #posy #temp &set #temp {(%1,%2)[%3,%4] } &set #temp &replace(#temp {%1} #posx) &set #temp &replace(#temp {%2} #posy) &set #temp &replace(#temp {%3} #count) &set #temp &replace(#temp {%4} #object) &join #results #temp &endfor &display #results Oh woot? BTW: Floors are first character in the message being 1, while walls are 2. And with wall manifestations, the #POSX is NOT multiplied by 2.
|