Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2006, 10:14 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Scripting with SQL

Is it possible to allow scripts to interact with an external SQL Server?
I saw Maniaman had made a script to send stuff to an IRC bot which forwarded it to his server, but I also want to forward the data from the webserver BACK to graal.

Also is it possible to detect what world a player is logged on by player.world or something?

And the playerlist, a lot like on Login when you press F7 you see no one online, even if someone is logged online there. (Maybe I timed it wrong or no one actually was online?) Id like to know if there is a way to disable the default playerlist.

If none of these are possible, please move this to future improvements as I can only post once per 8 hours, and would like to suggest they be implimented.

Last edited by Andy0687; 08-24-2006 at 12:34 AM..
Reply With Quote
  #2  
Old 08-24-2006, 04:35 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
I think this has been disabled...

not sure though
Reply With Quote
  #3  
Old 08-24-2006, 06:14 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Rapidwolve
I think this has been disabled...

not sure though

I am not aware of interfacing with SQL ever being enabled. I wouldnt have asked if I didnt need it for something.

I just need to be able to get data back from my SQL server and start using it IN the script. I also wanted to be able to indentify what world the player was on (There has to be a way to do it, since the global playerlist identifies what world they are on?).

Oh well can anyone else chime in with some comments? Maybe stefan will notice this thread eventually.
Reply With Quote
  #4  
Old 08-24-2006, 06:41 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
You could requesturl() a php/asp/perl/whatever script that retrieves the necessary information.

e:
I think a bit of clarifying is in order.

I mean something like this:
PHP Code:
temp.req requesturl("http://myurl.com/myscript.php?account=Tolnaftate2004"); 
myscript.php:
PHP Code:
<?php
  $host 
"localhost";
  
$user "joe";
  
$pass "mypass";

  foreach (
$_GET as $index => $val)
    $
$index $val;

  
$conn mysql_connect($host $user $pass);
  
mysql_select_db('mydb' $conn);

  
$res mysql_query("SELECT * FROM `mytable` WHERE account=$account",$conn);

  
// print the results in a fashion that can be easily translated into GScript
 
...
?>
Private data can be encrypted using GScript's md5() function.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/

Last edited by Tolnaftate2004; 08-24-2006 at 09:25 PM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.