Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya
You last visited: Today at 13:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Script PHP

Discussion on Script PHP within the Shaiya forum part of the MMORPGs category.

Reply
 
Old   #1
 
topazee's Avatar
 
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); ?>
topazee is offline  
Old 03/02/2011, 20:13   #2
 
eQuiNoX.'s Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 160
Received Thanks: 253
Change the first line to <?php
eQuiNoX. is offline  
Old 03/02/2011, 20:17   #3
 
topazee's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
Quote:
Originally Posted by eQuiNoX. View Post
Change the first line to <?php
always the same worries
topazee is offline  
Old 03/02/2011, 20:18   #4
 
topazee's Avatar
 
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);

?>
topazee is offline  
Old 03/02/2011, 20:33   #5
 
eQuiNoX.'s Avatar
 
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?
eQuiNoX. is offline  
Thanks
1 User
Old 03/02/2011, 20:41   #6
 
topazee's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
I do not know how, I'm newbie in php
topazee is offline  
Old 03/02/2011, 20:44   #7
 
topazee's Avatar
 
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
topazee is offline  
Old 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
Xx.LaMin.xX is offline  
Old 03/03/2011, 00:31   #9
 
topazee's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
Quote:
Originally Posted by Xx.LaMin.xX View Post
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:
topazee is offline  
Old 03/03/2011, 12:15   #10
 
topazee's Avatar
 
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
topazee is offline  
Old 03/04/2011, 22:32   #11
 
ProfNerwosol's Avatar
 
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.
ProfNerwosol is offline  
Thanks
4 Users
Old 03/11/2011, 02:38   #12
 
topazee's Avatar
 
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
topazee is offline  
Old 03/15/2011, 04:18   #13
 
topazee's Avatar
 
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
topazee is offline  
Old 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
Shaiyalancia is offline  
Old 03/15/2011, 11:43   #15
 
topazee's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 120
Received Thanks: 74
you try to redo the script to 0?

Quote:
sorry for my bad English
you speak french?
topazee is offline  
Reply


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.