|
You last visited: Today at 13:41
Advertisement
Script PHP
Discussion on Script PHP within the Shaiya forum part of the MMORPGs category.
03/02/2011, 20:03
|
#1
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
Script PHP
{Solved} Good evening,
do you have script for website Shaiya
as user online, pvp rank ...
because I 'and test the script are great but without success ...
exemple :
error :
Quote:
|
Players online: ".$online." Human: ".$human." Elf: ".$elf." Vail: ".$vail." DeathEater: ".$nordein." "; @mssql_close($link); ?>
|
|
|
|
03/02/2011, 20:13
|
#2
|
elite*gold: 0
Join Date: Jan 2011
Posts: 160
Received Thanks: 253
|
Change the first line to <?php
|
|
|
03/02/2011, 20:17
|
#3
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
Quote:
Originally Posted by eQuiNoX.
Change the first line to <?php
|
always the same worries
|
|
|
03/02/2011, 20:18
|
#4
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
Here is the complete script
Quote:
<?
$dbhost = $_ENV['LOCAL_DOMAIN'];
$dbuser = 'Shaiya';
$dbpwd = 'Shaiya123';
// connect to SQL server
if (!$link = @mssql_connect("$dbhost","$dbuser","$dbpwd"))
{
print "Failed to connect to MSSQL server.";
};
// select database
if (!@mssql_select_db("PS_GameData",$link))
{
print "Failed to select database.";
};
// check who's online
$result = @mssql_query("SELECT LoginStatus, Family FROM Chars WHERE LoginStatus=1",$link);
// initialize veriables
$online = @mssql_num_rows($result);
$human = 0;
$elf = 0;
$vail = 0;
$nordein = 0;
// fill variables with data (who's online)
while($row = @mssql_fetch_array($result,MSSQL_NUM))
{
if (@mssql_num_rows($result)==0) return;
switch($row[1])
{
case 0: $human++;break;
case 1: $elf++;break;
case 2: $vail++;break;
case 3: $nordein++;break;
};
};
@mssql_free_result($result);
// Print number of online players
print "<table style=\"border: 1px solid black;\">
<tr><td colspan=2>Players online: </td><td>".$online."</td></tr>
<tr><td>Human: </td><td>".$human."</td></tr>
<tr><td>Elf: </td><td>".$elf."</td></tr>
<tr><td>Vail: </td><td>".$vail."</td></tr>
<tr><td>DeathEater: </td><td>".$nordein."</td></tr>
</table>";
@mssql_close($link);
?>
|
|
|
|
03/02/2011, 20:33
|
#5
|
elite*gold: 0
Join Date: Jan 2011
Posts: 160
Received Thanks: 253
|
Quote:
<?php
$dbhost = '127.0.0.1';
$dbuser = 'Shaiya';
$dbpwd = 'Shaiya123';
// connect to SQL server
if (!$link = @mssql_connect("$dbhost","$dbuser","$dbpwd"))
{
print "Failed to connect to MSSQL server.";
};
// select database
if (!@mssql_select_db("PS_GameData",$link))
{
print "Failed to select database.";
};
// check who's online
$result = @mssql_query("SELECT LoginStatus, Family FROM Chars WHERE LoginStatus=1",$link);
// initialize veriables
$online = @mssql_num_rows($result);
$human = 0;
$elf = 0;
$vail = 0;
$nordein = 0;
// fill variables with data (who's online)
while($row = @mssql_fetch_array($result,MSSQL_NUM))
{
if (@mssql_num_rows($result)==0) return;
switch($row[1])
{
case 0: $human++;break;
case 1: $elf++;break;
case 2: $vail++;break;
case 3: $nordein++;break;
};
};
@mssql_free_result($result);
// Print number of online players
print "<table style=\"border: 1px solid black;\">
<tr><td colspan=2>Players online: </td><td>".$online."</td></tr>
<tr><td>Human: </td><td>".$human."</td></tr>
<tr><td>Elf: </td><td>".$elf."</td></tr>
<tr><td>Vail: </td><td>".$vail."</td></tr>
<tr><td>DeathEater: </td><td>".$nordein."</td></tr>
</table>";
@mssql_close($link);
?>
|
Works fine for me. Have u installed php on ur server?
|
|
|
03/02/2011, 20:41
|
#6
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
I do not know how, I'm newbie in php
|
|
|
03/02/2011, 20:44
|
#7
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
I actually use web host (host) and creates the site (web creator)
if you have any software I am willing to offer me
SQL Server 2005 I do not know if the php function is activated
|
|
|
03/03/2011, 00:09
|
#8
|
elite*gold: 0
Join Date: Feb 2011
Posts: 214
Received Thanks: 205
|
yes you need to active the php function check in php.ini
|
|
|
03/03/2011, 00:31
|
#9
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
Quote:
Originally Posted by Xx.LaMin.xX
yes you need to active the php function check in php.ini
|
Thanx, I have taken her myself but now easyphp a blank page I think that is because of intelligence on the databse
dbhost:
userhost:
pass:
|
|
|
03/03/2011, 12:15
|
#10
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
here is my worry now, I have a blank page
can you help me please?
thank you in advance for your help
|
|
|
03/04/2011, 22:32
|
#11
|
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 647
|
I wrote that script a long time ago. It's very simple and credits would be welcome.
To see what is wrong post errors you get. There's nothing you posted so far that looks like a script problem.
|
|
|
03/11/2011, 02:38
|
#12
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
I am a beginner in php can you help me please
I got a blank page
|
|
|
03/15/2011, 04:18
|
#13
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
{Solved}
Pour tous ceux qui ont le meme probleme il faut telecharger wampserver + extension php.
ensuite ouvrir le port 80
|
|
|
03/15/2011, 11:37
|
#14
|
elite*gold: 0
Join Date: Mar 2011
Posts: 9
Received Thanks: 0
|
Hi @ all,
I have the problem that iwas is set in the non-DB properly because I always only 1 player is displayed as Online.
What can be the error?
sorry for my bad English
|
|
|
03/15/2011, 11:43
|
#15
|
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
|
you try to redo the script to 0?
Quote:
you speak french?
|
|
|
 |
|
Similar Threads
|
L2Walker script: Solo rebuff/restock/return script
08/08/2012 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 63 Replies
Hello!
I've been reading alot and not really contributing so i'll start off here with a very well working script im using to bot my SK outside ivory tower in oren. I've tried to structure the code so it easily can be modified for another level of character, town, and hunting spot.
The script is made for CT2 Retail, mainly to get advantage of the newbie buffs (which now lasts all the way until level 62)
Change log:
Update 2008-09-01
Version 1.14 -Download
|
[suche] d2nt level rush script 1-25 / follow script
06/23/2010 - Diablo 2 Programming - 5 Replies
moin
erstmal sry falls es da doch schon was passendes zu gab - hab schonmal gesucht aber nur alte sachen gefunden oder eben antworten in richtung "geht so schnell dafür braucht man keinen bot" ^^
mein problem besteht darin dass ich für lvl 1 bis 20 immer x stunden brauche - trist geht ja noch halberwegs aber mit tombruns such ich mich immer dusselig ^^ - bzw cows sind noch schlimmer (dafür geht das cow-script für d2nt ausm bluebird zumindest halberwegs)
die frage ist jetz die - giebt...
|
All times are GMT +1. The time now is 13:42.
|
|