Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rohan
You last visited: Today at 19:23

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

Advertisement



Could Someone Help me on this script

Discussion on Could Someone Help me on this script within the Rohan forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 50
Received Thanks: 2
Could Someone Help me on this script

I wonder how to send items to all players using php,


This Script is successfully inserted items on some players, but to the players like newly registered or registered before insertion don't get items.

if someone could help me please..
(sorry for bad english) xD
kelvz002 is offline  
Old 08/11/2014, 13:52   #2
 
asmodeus812's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 200
Received Thanks: 23
You can do that much easier with plain PHP. You can use procedures as well. But
i will give you a php example

If you want to send items to event inventory for all chars on the server.

$sql = select * from dbo.TCharacter
$stmt = sqlsrv_query( $conn, $sql);

Or only for online chars

$sql = "select * from dbo.TCharacterLogin where login = 1";
$stmt = sqlsrv_query( $conn, $sql);

then loop thru every char_id and insert it in event inventory .
You can use standart While. Fetch the rows while the statement is true
then you can execute the statement below

$sql2 =insert into RohanGame.dbo.TEventItem(type,attr,stack,rank,equi p_level,equip_strength,equip_dexterity,equip_intel ligence,char_id,date) values......

I believe you can get the point. Thats not detailed by any means. Its up to you to structure the script

And please if you decide to use php
Consider this basic security measures
1.Prepared Statements -> SQL Injection
2.Strip HTML Special Chars -> Cross Site Scripting
asmodeus812 is offline  
Thanks
1 User
Old 08/11/2014, 17:29   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 50
Received Thanks: 2
Quote:
Originally Posted by asmodeus812 View Post
You can do that much easier with plain PHP. You can use procedures as well. But
i will give you a php example

If you want to send items to event inventory for all chars on the server.

$sql = select * from dbo.TCharacter
$stmt = sqlsrv_query( $conn, $sql);

Or only for online chars

$sql = "select * from dbo.TCharacterLogin where login = 1";
$stmt = sqlsrv_query( $conn, $sql);

then loop thru every char_id and insert it in event inventory .
You can use standart While. Fetch the rows while the statement is true
then you can execute the statement below

$sql2 =insert into RohanGame.dbo.TEventItem(type,attr,stack,rank,equi p_level,equip_strength,equip_dexterity,equip_intel ligence,char_id,date) values......

I believe you can get the point. Thats not detailed by any means. Its up to you to structure the script

And please if you decide to use php
Consider this basic security measures
1.Prepared Statements -> SQL Injection
2.Strip HTML Special Chars -> Cross Site Scripting
Thanks asmodeus this one would be helpful

Thanks asmodeus My php is now working perfectly Godspeed!
kelvz002 is offline  
Reply


Similar Threads Similar Threads
[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 19:24.


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.