It is currently Wed Nov 19, 2008 4:00 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject:
PostPosted: Sat Apr 29, 2006 8:23 am 
Exar Kun wrote:
I remember back about 6 years ago when I GMed for DW on Myth....He had a webpage the GMs could go to in order to check things like system load, reset "something" that seemed to help performance when the load was high, and to check on the number of mobiles. It would even give you the X, Y of large groups of mobiles.


Yup; there are lots and lots of really cool things that can be done through AUX and WWW scripts in POL; Anything you could script in the game could get an interface to -any other program at all- via one or both of these.

Whether being accessed through something simple like PHP or ASP, or a full-fledged C, C++ or .NET program, you can really do anything at all through them.


You could - with nothing at all but eScript - write a set of WWW pages that do exactly what the pages you described do. Though I never recommend providing direct access to WWW scripts to clients (I use them only to provide XML output to other systems), you CAN do it... in fact, that's what they were designed for. You can even link in images and such all you want.

For example, I've seen - entirely in eScript through the WWW scripts - a system that displayed a map, and used CSS (again: INSIDE the eScript WWW page) to put a mark on the map for where a player was located... and the map image was served from within POL's www. Again: I don't recommend this.. but there's no reason the WWW POL script could not simply link to the image hosted on a 'real' web server, but still be entirely scripted in eScript.

I just would not want to have POL taking up the task of loading an image into memory and having to stream it to a client, is all. No sense putting more load on it than needed, when web hosting is 'a dime a dozen'.


Let's just imagine this, as a simple example of a possibly useful WWW script:

(Note: I'm typing as I'm thinking, so it's very likely there will be syntax or function name errors here)

Code:
//LISTHOSTILES.SRC

use uo;
use http;

program ListHostiles()
  var x := QueryParam("x");
  var y := QueryParam("y");
  foreach Mobile in ListMobilesNearLocation(x, y, z, 20)
    if (IsHostile(Mobile))
      WriteHTML("<a href='killmobile.ecl?serial="+mobile.serial+"'>"+mobile.name+"</a><br>");
    endif
  endforeach
endprogram


Note how the URL is 'built' to point to killmobile.ecl, and pass the serial of the monster. killmobile.ecl would then take the QueryParam("serial") and use that to get a ref to the monster, and kill it.

Of course, this example does nothing to validate that the person loading these pages actually should be allowed to kill a mobile. It also does not list nearly enough information to know if you really want to kill that mobile or not. But I have a similar system which is used to reset the graphics of mobiles whose graphic numbers have been set to an invalid value which crashes the 2d client; So if a GM messes up and sets something to an improper graphic ID, they can simply go to the page, and it tells them there last location (because the web site has their account login info, and passes it appropriately), or lets them enter a custom location. The script lists the mobiles in the area and shows the graphic IDs, and lets them choose one. The script that handles the link takes the serial, and gets a ref to the mobile, then resets the graphic on that mobile to 1 (ogre), which is 'safe', so they can log in without crashing.

So, just a wild idea of maybe one way a WWW script could be used to pass any information you like, and can be used to let the viewer actually take ACTION that has effect in the game. If you were really crazy, you could even design a playable 'web client' for the game through WWW scripts - though obviously, performance would be totally unacceptable.. .but ALL the information and capabilities are there.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl