Local weather...
by Corin · in Torque Game Engine · 06/21/2005 (3:22 am) · 3 replies
About the author
#2
Now this wil send the %query to this page "htttp://localhost/auth/game_login.php", now depending on what info the page gets it can reply.
then on the webpage have a script like this
http://www.vbulletin.org/forum/showthread.php?p=533325&posted=1#post533325
Also I wrote all this without checking for errors so if you find anything wrong with it let me know.
06/21/2005 (4:21 pm)
Maybe use HTTPObject, here is a little example.//$AuthServer = "localhost:80";
//$AuthServerPath = "/auth/";
function CheckWeather(%client, %username, %passcrc)
{
%check = "1";
%owner = %username;
%area = "planet omega";
%client.authReturned = false;
%query = "city="@%owner@"\t"@
"airport="@%passcrc@"\r";
%server = $AuthServer;
%path = $AuthServerPath;
%script = %path @ "game_login.php";
%upd = new HTTPObject(Weather);
%client.sendObject = %upd; //store object details just in case
%upd.clientid = %client;
%upd.get(%server, %script, %query);
$Control = "1";
}
function Weather::onLine( %this, %line )
{
echo(getWord(%line, 0) SPC getWord(%line, 1)); // It now echos Weather 50
}Now this wil send the %query to this page "htttp://localhost/auth/game_login.php", now depending on what info the page gets it can reply.
then on the webpage have a script like this
$city = $GLOBALS['city'];
$airport = $GLOBALS['airport'];
if($city == "Mlaga" and $airport == "Airport")
{
echo "Weather 50 100";
exit();
}Go here to download a script for the website to add weather to your site, that way you can replace echo "Weather 50 100"; with echo $yourvariable; you variables would load from that script from this site, not sure though never used this weather file.http://www.vbulletin.org/forum/showthread.php?p=533325&posted=1#post533325
Also I wrote all this without checking for errors so if you find anything wrong with it let me know.
#3
http://www.vbulletin.org/forum/attachment.php?s=d492ba258e6420347622a76b358e8aed&attachmentid=19710
, you just have to register. I have not used this file before so im not sure it works, if it dosent maybe I can find something else. Read the other link I gave you for setup instructions.
06/22/2005 (4:30 pm)
Juan the page I sent was difficult for me to understand too. This should be the link to the file http://www.vbulletin.org/forum/attachment.php?s=d492ba258e6420347622a76b358e8aed&attachmentid=19710
, you just have to register. I have not used this file before so im not sure it works, if it dosent maybe I can find something else. Read the other link I gave you for setup instructions.
Torque Owner Very Interactive Person