Register for your free account! | Forgot your password?

You last visited: Today at 07:47

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

Advertisement



Help Script

Discussion on Help Script within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
Help Script

hello
I explained my concern
So I am doing a record bosss
My bosss by bosss
I show you my script
I fail to understand why it is not working



PHP Code:
<?php 
function mssql_escape_string($data) { 
if(!isset(
$data) or empty($data)) return ''
if(
is_numeric($data)) return $data
$non_displayables = array( 
'/%0[0-8bcef]/'// url encoded 00-08, 11, 12, 14, 15 
'/%1[0-9a-f]/'// url encoded 16-31 
'/[\x00-\x08]/'// 00-08 
'/\x0b/'// 11 
'/\x0c/'// 12 
'/[\x0e-\x1f]/' // 14-31 
); 
foreach(
$non_displayables as $regex
$data preg_replace($regex,'',$data); 
$data str_replace("'","''",$data); 
return 
$data



$host '127.0.0.1'
$dbuser 'Shaiya';
$dbpass 'Shaiya123'
$database 'PS_GameLog'
$conn = @odbc_connect("Driver={SQL Server};Server=$host;Database=$database"$dbuser$dbpass) or die("Database Connection Error!"); 
$res odbc_exec($conn"SELECT TOP 1 [Text1], [Text3], [ActionTime] FROM PS_GameLog.dbo.ActionLog WHERE Value3=3350 AND MapID=18 AND ActionType=173 AND [Text2]='death'order by ActionTime desc"); 
$detail=odbc_fetch_array($res); 
if (
odbc_num_rows($res)==0); 
else{ 
echo 
"



<center>Boss records 
<table cellspacing=1 cellpadding=2  border=1 style=\"border-style:hidden;\"> 
<tr> 
<th>Tuer par</th> 
<th>Nom Boss</th> 
<th>Heure de la mort</th> 
</tr>"

while(
$row odbc_fetch_array($res)) 

echo 
"<tr>"
echo 
"<td>"$row['Text3'] ."</td><td>"$row['Text1'] ."</td><td>"$row['ActionTime'] ."</td>"
echo 
"</tr>"

echo 
"</table></center>"

?>

Thank you in advance to anyone who could help me
Apero is offline  
Old 05/26/2015, 22:10   #2
 
SkuulCandy's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 424
Received Thanks: 113
Your sql code is false, take this php code (not html + php )
SkuulCandy is offline  
Old 05/26/2015, 22:19   #3
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
I just noticed that he very well the script function
The concern is that not indicate the final kill
when I my SELECT TOP 5 it tells me the 4th not the latest
Apero is offline  
Old 05/26/2015, 22:41   #4
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
Attached Images
File Type: jpg Sans titre 3.jpg (75.5 KB, 205 views)
Apero is offline  
Old 05/26/2015, 23:23   #5
 
momocruz's Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 390
Received Thanks: 377
Quote:
Originally Posted by Apero View Post
Tu as juste à inversé l'ordre d'affichage au lieu du 1 er au dernier tu ranges par le dernier au 1er

Change this line
PHP Code:
$res odbc_exec($conn"SELECT [Text1], [Text2], [Text3], [MapID], [ActionTime] FROM ActionLog WHERE [ActionType]='173' AND [Text2]='death'order by ActionTime desc"); 
for this
PHP Code:
$res odbc_exec($conn"SELECT [Text1], [Text2], [Text3], [MapID], [ActionTime] FROM ActionLog WHERE [ActionType]='173' AND [Text2]='death'order by ActionTime asc"); 
Voila
momocruz is offline  
Old 05/26/2015, 23:35   #6
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
Non en faite le s'a m'indique l'avant dernier mort mes pas le dernier
Apero is offline  
Old 05/27/2015, 14:00   #7
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
After some modification
This is the result
But I have a concern that he shows me the last but not the death my last


PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<style type="text/css"> 
<table style="background-color : transparent;">
html, body {height:100%; margin:0; padding:0;} 
#page-background {position:fixed; top:0; left:0; width:100%; height:100%;} 
#content {position:relative; z-index:1; padding:10px;} 
body,td,th { 


</style> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
</head> 
<body text="#000000"> 


<center><div id="page-background"><img src="kimu.gif"  width="200" height="200" alt=""></div> 
<div id="content"> 
<?php 
function mssql_escape_string($data) { 
if(!isset(
$data) or empty($data)) return ''
if(
is_numeric($data)) return $data
$non_displayables = array( 
'/%0[0-8bcef]/'// url encoded 00-08, 11, 12, 14, 15 
'/%1[0-9a-f]/'// url encoded 16-31 
'/[\x00-\x08]/'// 00-08 
'/\x0b/'// 11 
'/\x0c/'// 12 
'/[\x0e-\x1f]/' // 14-31 
); 
foreach(
$non_displayables as $regex
$data preg_replace($regex,'',$data); 
$data str_replace("'","''",$data); 
return 
$data



$host '127.0.0.1'
$dbuser 'Shaiya';
$dbpass 'Shaiya123'
$database 'PS_GameLog'
$conn = @odbc_connect("Driver={SQL Server};Server=$host;Database=$database"$dbuser$dbpass) or die("Database Connection Error!"); 
$res odbc_exec($conn"SELECT TOP 2 [Text1], [Text3], [ActionTime] FROM PS_Gamelog.dbo.ActionLog WHERE Value3=3347 AND  ActionType=173 AND [Text2]='death'order by ActionTime desc"); 
$detail=odbc_fetch_array($res); 
if (
odbc_num_rows($res)==0); 
else{ 
echo 
"



<center> Villarica
<table cellspacing=1 cellpadding=2  border=1 style=\"border-style:hidden;\"> 


<tr> 
<th>Tuer par</th> 
<th>Heure de la mort</th> 
</tr>"

while(
$row odbc_fetch_array($res)) 

echo 
"<tr>"
echo 
"<td>"$row['Text3'] ."</td><td>"$row['ActionTime'] ."</td>"
echo 
"</tr>"

echo 
"</table></center>"

?>

This is the result
When I asked TOP 2
And he gives a




If anyone can find out the top
Attached Images
File Type: jpg Sans titre 1.jpg (14.5 KB, 175 views)
Apero is offline  
Old 05/27/2015, 15:03   #8
 
SkuulCandy's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 424
Received Thanks: 113
Tu veux qu'il affiche uniquement 1 boss ou plusieurs que tu veux ou bien toutes une palanqué ?

You want to display only one or more bosses you want all of boss ?
SkuulCandy is offline  
Old 05/27/2015, 15:40   #9
 
Apero's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 156
Received Thanks: 42
No 1 I will only make a script by boss
my the only thing that works is not it not indicate that the latest death in my penultimate

Look when I made the sql database it really shows me the last 2 dead


[Français]
Non 1 seul je vais faire un script par boss
mes la seul chose qui fonctionne pas c'est que il indique pas la derniere mort mes l'avant derniere

Regarde quand je fait sql sur la database il m'indique bien les 2 dernier mort


While not on the php script


[Français]
Alors que sur le script php non


Attached Images
File Type: jpg Sans titre 1.jpg (31.1 KB, 167 views)
File Type: jpg Sans titre 2.jpg (16.4 KB, 167 views)
Apero is offline  
Old 05/27/2015, 19:27   #10
 
SkuulCandy's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 424
Received Thanks: 113
Ah ok, donc tu voudrais qu'il affiche les 2 dernières morts ? A ce moment la faudrait faire a en sorte d'afficher deux lignes. Là il y en a qu'une.
SkuulCandy is offline  
Reply


Similar Threads Similar Threads
[Selling] ~ Arma II DayZ Mod ~ Script Executer + Updated InfiStar Bypass ~ Use any script menus
01/27/2015 - DayZ Trading - 0 Replies
Hello, So today i will be selling a 100% Undetected Script executer + InfiStar bypass So you can run any scripts you wish without getting banned by infistar or battleye Also as a bonus you will get tons of script menus to run with alot of features. Spawning menu's and more. To buy it & have some proof if you wish add me on skype: darthrun
[Biete] Scripteen Ajax Photo Rating Script V2 License (Hot or Not Script) [S] Paypal
01/31/2013 - Trading - 0 Replies
Hey, und zwar brauche ich das Script nicht mehr und stelle meine License deshalb hier zum Verkauf. Link zum Script: Hot or Not Script | Photo Rating Script | Scripteen PHP Scripts Macht mir Angebote suche Paypal. Screenshots: http://scripteen.com/uploads/156-Screen%20Shot%20 2012-05-19%20at%2010.32.56%20AM.png http://scripteen.com/uploads/381-Screen%20Shot%20 2012-05-19%20at%2010.33.07%20AM.png



All times are GMT +1. The time now is 07:48.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.