Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rohan
You last visited: Today at 06:32

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

 

Could Someone Help me on this script

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 47
Received Thanks: 1
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   #2
 
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   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 47
Received Thanks: 1
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



« Previous Thread | Next Thread »

Similar Threads
[Biete] Scripteen Ajax Photo Rating Script V2 License (Hot or Not Script) [S] Paypal
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...
0 Replies - Trading



All times are GMT +2. The time now is 06:32.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.