Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 21:30

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

Advertisement



[Release] Useful PHP scripts for your server ( Sanitized Inputs - No SQL Injection )

Discussion on [Release] Useful PHP scripts for your server ( Sanitized Inputs - No SQL Injection ) within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
sofka30's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 112
Received Thanks: 31
[Release] Useful PHP scripts for your server ( Sanitized Inputs - No SQL Injection )

Hello,

As I promised to release more of the stuff that you may need to have a smooth experience with your server development, These are some scripts that may help you to get to such point.



Autoitem equipment script ( to 10 degree ):

PHP Code:
<?php
error_reporting
(ALL);
// Connect
mssql_connect("WIN-2HIH5B6MR53\SQLEXPRESS""sa""123456") or die("Database problem #1");

// Database
mssql_select_db("SRO_VT_SHARD") or die("Database problem #2");

// Select from Online Users to save DB, xD
#mssql_select_db("SRO_VT_LOG") or die("Database problem #2");
#$OnlineChars = mssql_query("SELECT * FROM _OnlineOffline WHERE Status='Online'");
#while ($POnlineChars = mssql_fetch_array($OnlineChars)) {

// DATABASE
mssql_select_db("SRO_VT_SHARD") or die("Database problem #2");

// Select following chars!
#$Chars = mssql_query("SELECT * FROM _Char where CharName16 = '{$POnlineChars['Charname']}' and CurLevel in (1, 8, 16, 24, 32, 42, 52, 64, 76, 90)");
$Chars mssql_query("SELECT * FROM _Char where CharName16 = 'Star' and CurLevel in (1, 8, 16, 24, 32, 42, 52, 64, 76, 90)");
while (
$PChars mssql_fetch_array($Chars)) {

// Level to degree
if($PChars['CurLevel'] == "1") {
$degree "01";
} elseif(
$PChars['CurLevel'] == '8') {
$degree "02";
} elseif(
$PChars['CurLevel'] == '16') {
$degree "03";
} elseif(
$PChars['CurLevel'] == '24') {
$degree "04";
} elseif(
$PChars['CurLevel'] == '32') {
$degree "05";
} elseif(
$PChars['CurLevel'] == '42') {
$degree "06";
} elseif(
$PChars['CurLevel'] == '52') {
$degree "07";
} elseif(
$PChars['CurLevel'] == '64') {
$degree "08";
} elseif(
$PChars['CurLevel'] == '76') {
$degree "09";
} elseif(
$PChars['CurLevel'] == '90') {
$degree "10";
}

// Select inventory
$Inventory mssql_query("SELECT * FROM _Inventory where CharID = '{$PChars['CharID']}' and Slot in (0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12)");
while (
$PInventory mssql_fetch_array($Inventory)) {

// Check if item id is not 0
if ($PInventory['ItemID'] != '0') {

// Select from items
$Items mssql_query("SELECT * FROM _Items where ID64 = '{$PInventory['ItemID']}'");
while (
$PItems mssql_fetch_array($Items)) {
// Select from RefObjCommon
$Names mssql_query("SELECT * FROM _RefObjCommon where ID = '{$PItems['RefItemID']}'");
while (
$PNames mssql_fetch_array($Names)) {

// Degrees
$search = array(
'01''02''03''04''05',
'06''07''08''09',
);

// Replace Degree.
$replace = array(
$degree$degree$degree$degree$degree,
$degree$degree$degree$degree,
);
$output str_replace($search$replace$PNames['CodeName128']);

// Check codes
$gogo = array(
'_B_RARE_HONOR''_C_RARE_HONOR''_A_RARE''_B_RARE''_A_DEF''_A_RARE_HONOR''_BA_A''_CA_A''_AA_A''_LA_A''_FA_A''_SA_A''_BASIC',
'_EARRING_01_A''_EARRING_02_A''_EARRING_03_A''_EARRING_04_A''_EARRING_05_A''_EARRING_06_A''_EARRING_07_A''_EARRING_08_A''_EARRING_09_A''_EARRING_10_A',
'_RING_01_A''_RING_02_A''_RING_03_A''_RING_04_A''_RING_05_A''_RING_06_A''_RING_07_A''_RING_08_A''_RING_09_A''_RING_10_A',
'_NECKLACE_01_A''_NECKLACE_02_A''_NECKLACE_03_A''_NECKLACE_04_A''_NECKLACE_05_A''_NECKLACE_06_A''_NECKLACE_07_A''_NECKLACE_08_A''_NECKLACE_09_A''_NECKLACE_10_A',
'_TSTAFF_01_A''_TSTAFF_02_A''_TSTAFF_03_A''_TSTAFF_04_A''_TSTAFF_05_A''_TSTAFF_06_A''_TSTAFF_07_A''_TSTAFF_08_A''_TSTAFF_09_A''_TSTAFF_10_A',
'_STAFF_01_A''_STAFF_02_A''_STAFF_03_A''_STAFF_04_A''_STAFF_05_A''_STAFF_06_A''_STAFF_07_A''_STAFF_08_A''_STAFF_09_A''_STAFF_10_A',
'_SWORD_01_A''_SWORD_02_A''_SWORD_03_A''_SWORD_04_A''_SWORD_05_A''_SWORD_06_A''_SWORD_07_A''_SWORD_08_A''_SWORD_09_A''_SWORD_10_A',
'_CROSSBOW_01_A''_CROSSBOW_02_A''_CROSSBOW_03_A''_CROSSBOW_04_A''_CROSSBOW_05_A''_CROSSBOW_06_A''_CROSSBOW_07_A''_CROSSBOW_08_A''_CROSSBOW_09_A''_CROSSBOW_10_A',
'_TSWORD_01_A''_TSWORD_02_A''_TSWORD_03_A''_TSWORD_04_A''_TSWORD_05_A''_TSWORD_06_A''_TSWORD_07_A''_TSWORD_08_A''_TSWORD_09_A''_TSWORD_10_A',
'_DAGGER_01_A''_DAGGER_02_A''_DAGGER_03_A''_DAGGER_04_A''_DAGGER_05_A''_DAGGER_06_A''_DAGGER_07_A''_DAGGER_08_A''_DAGGER_09_A''_DAGGER_10_A',
'_DARKSTAFF_01_A''_DARKSTAFF_02_A''_DARKSTAFF_03_A''_DARKSTAFF_04_A''_DARKSTAFF_05_A''_DARKSTAFF_06_A''_DARKSTAFF_07_A''_DARKSTAFF_08_A''_DARKSTAFF_09_A''_DARKSTAFF_10_A',
'_HARP_01_A''_HARP_02_A''_HARP_03_A''_HARP_04_A''_HARP_05_A''_HARP_06_A''_HARP_07_A''_HARP_08_A''_HARP_09_A''_HARP_10_A',
'_SHIELD_01_A''_SHIELD_02_A''_SHIELD_03_A''_SHIELD_04_A''_SHIELD_05_A''_SHIELD_06_A''_SHIELD_07_A''_SHIELD_08_A''_SHIELD_09_A''_SHIELD_10_A',
'_AXE_01_A''_AXE_02_A''_AXE_03_A''_AXE_04_A''_AXE_05_A''_AXE_06_A''_AXE_07_A''_AXE_08_A''_AXE_09_A''_AXE_10_A',
'_TBLADE_01_A''_TBLADE_02_A''_TBLADE_03_A''_TBLADE_04_A''_TBLADE_05_A''_TBLADE_06_A''_TBLADE_07_A''_TBLADE_08_A''_TBLADE_09_A''_TBLADE_10_A',
'_BLADE_01_A''_BLADE_02_A''_BLADE_03_A''_BLADE_04_A''_BLADE_05_A''_BLADE_06_A''_BLADE_07_A''_BLADE_08_A''_BLADE_09_A''_BLADE_10_A',
'_BOW_01_A''_BOW_02_A''_BOW_03_A''_BOW_04_A''_BOW_05_A''_BOW_06_A''_BOW_07_A''_BOW_08_A''_BOW_09_A''_BOW_10_A',
'_SPEAR_01_A''_SPEAR_02_A''_SPEAR_03_A''_SPEAR_04_A''_SPEAR_05_A''_SPEAR_06_A''_SPEAR_07_A''_SPEAR_08_A''_SPEAR_09_A''_SPEAR_10_A',

'_BA_B''_CA_B''_AA_B''_LA_B''_FA_B''_SA_B',
'_EARRING_01_B''_EARRING_02_B''_EARRING_03_B''_EARRING_04_B''_EARRING_05_B''_EARRING_06_B''_EARRING_07_B''_EARRING_08_B''_EARRING_09_B''_EARRING_10_B',
'_RING_01_B''_RING_02_B''_RING_03_B''_RING_04_B''_RING_05_B''_RING_06_B''_RING_07_B''_RING_08_B''_RING_09_B''_RING_10_B',
'_NECKLACE_01_B''_NECKLACE_02_B''_NECKLACE_03_B''_NECKLACE_04_B''_NECKLACE_05_B''_NECKLACE_06_B''_NECKLACE_07_B''_NECKLACE_08_B''_NECKLACE_09_B''_NECKLACE_10_B',
'_TSTAFF_01_B''_TSTAFF_02_B''_TSTAFF_03_B''_TSTAFF_04_B''_TSTAFF_05_B''_TSTAFF_06_B''_TSTAFF_07_B''_TSTAFF_08_B''_TSTAFF_09_B''_TSTAFF_10_B',
'_STAFF_01_B''_STAFF_02_B''_STAFF_03_B''_STAFF_04_B''_STAFF_05_B''_STAFF_06_B''_STAFF_07_B''_STAFF_08_B''_STAFF_09_B''_STAFF_10_B',
'_SWORD_01_B''_SWORD_02_B''_SWORD_03_B''_SWORD_04_B''_SWORD_05_B''_SWORD_06_B''_SWORD_07_B''_SWORD_08_B''_SWORD_09_B''_SWORD_10_B',
'_CROSSBOW_01_B''_CROSSBOW_02_B''_CROSSBOW_03_B''_CROSSBOW_04_B''_CROSSBOW_05_B''_CROSSBOW_06_B''_CROSSBOW_07_B''_CROSSBOW_08_B''_CROSSBOW_09_B''_CROSSBOW_10_B',
'_TSWORD_01_B''_TSWORD_02_B''_TSWORD_03_B''_TSWORD_04_B''_TSWORD_05_B''_TSWORD_06_B''_TSWORD_07_B''_TSWORD_08_B''_TSWORD_09_B''_TSWORD_10_B',
'_DAGGER_01_B''_DAGGER_02_B''_DAGGER_03_B''_DAGGER_04_B''_DAGGER_05_B''_DAGGER_06_B''_DAGGER_07_B''_DAGGER_08_B''_DAGGER_09_B''_DAGGER_10_B',
'_DARKSTAFF_01_B''_DARKSTAFF_02_B''_DARKSTAFF_03_B''_DARKSTAFF_04_B''_DARKSTAFF_05_B''_DARKSTAFF_06_B''_DARKSTAFF_07_B''_DARKSTAFF_08_B''_DARKSTAFF_09_B''_DARKSTAFF_10_B',
'_HARP_01_B''_HARP_02_B''_HARP_03_B''_HARP_04_B''_HARP_05_B''_HARP_06_B''_HARP_07_B''_HARP_08_B''_HARP_09_B''_HARP_10_B',
'_SHIELD_01_B''_SHIELD_02_B''_SHIELD_03_B''_SHIELD_04_B''_SHIELD_05_B''_SHIELD_06_B''_SHIELD_07_B''_SHIELD_08_B''_SHIELD_09_B''_SHIELD_10_B',
'_AXE_01_B''_AXE_02_B''_AXE_03_B''_AXE_04_B''_AXE_05_B''_AXE_06_B''_AXE_07_B''_AXE_08_B''_AXE_09_B''_AXE_10_B',
'_TBLADE_01_B''_TBLADE_02_B''_TBLADE_03_B''_TBLADE_04_B''_TBLADE_05_B''_TBLADE_06_B''_TBLADE_07_B''_TBLADE_08_B''_TBLADE_09_B''_TBLADE_10_B',
'_BLADE_01_B''_BLADE_02_B''_BLADE_03_B''_BLADE_04_B''_BLADE_05_B''_BLADE_06_B''_BLADE_07_B''_BLADE_08_B''_BLADE_09_B''_BLADE_10_B',
'_BOW_01_B''_BOW_02_B''_BOW_03_B''_BOW_04_B''_BOW_05_B''_BOW_06_B''_BOW_07_B''_BOW_08_B''_BOW_09_B''_BOW_10_B',
'_SPEAR_01_B''_SPEAR_02_B''_SPEAR_03_B''_SPEAR_04_B''_SPEAR_05_B''_SPEAR_06_B''_SPEAR_07_B''_SPEAR_08_B''_SPEAR_09_B''_SPEAR_10_B',


);

// Replacement list
$nigglet = array(
'_C_RARE''_C_RARE''_C_RARE''_C_RARE''_C_RARE''_C_RARE''_BA_C_RARE''_CA_C_RARE''_AA_C_RARE''_LA_C_RARE''_FA_C_RARE''_SA_C_RARE''_C_RARE',
'_EARRING_01_C_RARE''_EARRING_02_C_RARE''_EARRING_03_C_RARE''_EARRING_04_C_RARE''_EARRING_05_C_RARE''_EARRING_06_C_RARE''_EARRING_07_C_RARE''_EARRING_08_C_RARE''_EARRING_09_C_RARE''_EARRING_10_C_RARE',
'_RING_01_C_RARE''_RING_02_C_RARE''_RING_03_C_RARE''_RING_04_C_RARE''_RING_05_C_RARE''_RING_06_C_RARE''_RING_07_C_RARE''_RING_08_C_RARE''_RING_09_C_RARE''_RING_10_C_RARE',
'_NECKLACE_01_C_RARE''_NECKLACE_02_C_RARE''_NECKLACE_03_C_RARE''_NECKLACE_04_C_RARE''_NECKLACE_05_C_RARE''_NECKLACE_06_C_RARE''_NECKLACE_07_C_RARE''_NECKLACE_08_C_RARE''_NECKLACE_09_C_RARE''_NECKLACE_10_C_RARE',
'_TSTAFF_01_C_RARE''_TSTAFF_02_C_RARE''_TSTAFF_03_C_RARE''_TSTAFF_04_C_RARE''_TSTAFF_05_C_RARE''_TSTAFF_06_C_RARE''_TSTAFF_07_C_RARE''_TSTAFF_08_C_RARE''_TSTAFF_09_C_RARE''_TSTAFF_10_C_RARE',
'_STAFF_01_C_RARE''_STAFF_02_C_RARE''_STAFF_03_C_RARE''_STAFF_04_C_RARE''_STAFF_05_C_RARE''_STAFF_06_C_RARE''_STAFF_07_C_RARE''_STAFF_08_C_RARE''_STAFF_09_C_RARE''_STAFF_10_C_RARE',
'_SWORD_01_C_RARE''_SWORD_02_C_RARE''_SWORD_03_C_RARE''_SWORD_04_C_RARE''_SWORD_05_C_RARE''_SWORD_06_C_RARE''_SWORD_07_C_RARE''_SWORD_08_C_RARE''_SWORD_09_C_RARE''_SWORD_10_C_RARE',
'_CROSSBOW_01_C_RARE''_CROSSBOW_02_C_RARE''_CROSSBOW_03_C_RARE''_CROSSBOW_04_C_RARE''_CROSSBOW_05_C_RARE''_CROSSBOW_06_C_RARE''_CROSSBOW_07_C_RARE''_CROSSBOW_08_C_RARE''_CROSSBOW_09_C_RARE''_CROSSBOW_10_C_RARE',
'_TSWORD_01_C_RARE''_TSWORD_02_C_RARE''_TSWORD_03_C_RARE''_TSWORD_04_C_RARE''_TSWORD_05_C_RARE''_TSWORD_06_C_RARE''_TSWORD_07_C_RARE''_TSWORD_08_C_RARE''_TSWORD_09_C_RARE''_TSWORD_10_C_RARE',
'_DAGGER_01_C_RARE''_DAGGER_02_C_RARE''_DAGGER_03_C_RARE''_DAGGER_04_C_RARE''_DAGGER_05_C_RARE''_DAGGER_06_C_RARE''_DAGGER_07_C_RARE''_DAGGER_08_C_RARE''_DAGGER_09_C_RARE''_DAGGER_10_C_RARE',
'_DARKSTAFF_01_C_RARE''_DARKSTAFF_02_C_RARE''_DARKSTAFF_03_C_RARE''_DARKSTAFF_04_C_RARE''_DARKSTAFF_05_C_RARE''_DARKSTAFF_06_C_RARE''_DARKSTAFF_07_C_RARE''_DARKSTAFF_08_C_RARE''_DARKSTAFF_09_C_RARE''_DARKSTAFF_10_C_RARE',
'_HARP_01_C_RARE''_HARP_02_C_RARE''_HARP_03_C_RARE''_HARP_04_C_RARE''_HARP_05_C_RARE''_HARP_06_C_RARE''_HARP_07_C_RARE''_HARP_08_C_RARE''_HARP_09_C_RARE''_HARP_10_C_RARE',
'_SHIELD_01_C_RARE''_SHIELD_02_C_RARE''_SHIELD_03_C_RARE''_SHIELD_04_C_RARE''_SHIELD_05_C_RARE''_SHIELD_06_C_RARE''_SHIELD_07_C_RARE''_SHIELD_08_C_RARE''_SHIELD_09_C_RARE''_SHIELD_10_C_RARE',
'_AXE_01_C_RARE''_AXE_02_C_RARE''_AXE_03_C_RARE''_AXE_04_C_RARE''_AXE_05_C_RARE''_AXE_06_C_RARE''_AXE_07_C_RARE''_AXE_08_C_RARE''_AXE_09_C_RARE''_AXE_10_C_RARE',
'_TBLADE_01_C_RARE''_TBLADE_02_C_RARE''_TBLADE_03_C_RARE''_TBLADE_04_C_RARE''_TBLADE_05_C_RARE''_TBLADE_06_C_RARE''_TBLADE_07_C_RARE''_TBLADE_08_C_RARE''_TBLADE_09_C_RARE''_TBLADE_10_C_RARE',
'_BLADE_01_C_RARE''_BLADE_02_C_RARE''_BLADE_03_C_RARE''_BLADE_04_C_RARE''_BLADE_05_C_RARE''_BLADE_06_C_RARE''_BLADE_07_C_RARE''_BLADE_08_C_RARE''_BLADE_09_C_RARE''_BLADE_10_C_RARE',
'_BOW_01_C_RARE''_BOW_02_C_RARE''_BOW_03_C_RARE''_BOW_04_C_RARE''_BOW_05_C_RARE''_BOW_06_C_RARE''_BOW_07_C_RARE''_BOW_08_C_RARE''_BOW_09_C_RARE''_BOW_10_C_RARE',
'_SPEAR_01_C_RARE''_SPEAR_02_C_RARE''_SPEAR_03_C_RARE''_SPEAR_04_C_RARE''_SPEAR_05_C_RARE''_SPEAR_06_C_RARE''_SPEAR_07_C_RARE''_SPEAR_08_C_RARE''_SPEAR_09_C_RARE''_SPEAR_10_C_RARE',

'_BA_C_RARE''_CA_C_RARE''_AA_C_RARE''_LA_C_RARE''_FA_C_RARE''_SA_C_RARE',
'_EARRING_01_C_RARE''_EARRING_02_C_RARE''_EARRING_03_C_RARE''_EARRING_04_C_RARE''_EARRING_05_C_RARE''_EARRING_06_C_RARE''_EARRING_07_C_RARE''_EARRING_08_C_RARE''_EARRING_09_C_RARE''_EARRING_10_C_RARE',
'_RING_01_C_RARE''_RING_02_C_RARE''_RING_03_C_RARE''_RING_04_C_RARE''_RING_05_C_RARE''_RING_06_C_RARE''_RING_07_C_RARE''_RING_08_C_RARE''_RING_09_C_RARE''_RING_10_C_RARE',
'_NECKLACE_01_C_RARE''_NECKLACE_02_C_RARE''_NECKLACE_03_C_RARE''_NECKLACE_04_C_RARE''_NECKLACE_05_C_RARE''_NECKLACE_06_C_RARE''_NECKLACE_07_C_RARE''_NECKLACE_08_C_RARE''_NECKLACE_09_C_RARE''_NECKLACE_10_C_RARE',
'_TSTAFF_01_C_RARE''_TSTAFF_02_C_RARE''_TSTAFF_03_C_RARE''_TSTAFF_04_C_RARE''_TSTAFF_05_C_RARE''_TSTAFF_06_C_RARE''_TSTAFF_07_C_RARE''_TSTAFF_08_C_RARE''_TSTAFF_09_C_RARE''_TSTAFF_10_C_RARE',
'_STAFF_01_C_RARE''_STAFF_02_C_RARE''_STAFF_03_C_RARE''_STAFF_04_C_RARE''_STAFF_05_C_RARE''_STAFF_06_C_RARE''_STAFF_07_C_RARE''_STAFF_08_C_RARE''_STAFF_09_C_RARE''_STAFF_10_C_RARE',
'_SWORD_01_C_RARE''_SWORD_02_C_RARE''_SWORD_03_C_RARE''_SWORD_04_C_RARE''_SWORD_05_C_RARE''_SWORD_06_C_RARE''_SWORD_07_C_RARE''_SWORD_08_C_RARE''_SWORD_09_C_RARE''_SWORD_10_C_RARE',
'_CROSSBOW_01_C_RARE''_CROSSBOW_02_C_RARE''_CROSSBOW_03_C_RARE''_CROSSBOW_04_C_RARE''_CROSSBOW_05_C_RARE''_CROSSBOW_06_C_RARE''_CROSSBOW_07_C_RARE''_CROSSBOW_08_C_RARE''_CROSSBOW_09_C_RARE''_CROSSBOW_10_C_RARE',
'_TSWORD_01_C_RARE''_TSWORD_02_C_RARE''_TSWORD_03_C_RARE''_TSWORD_04_C_RARE''_TSWORD_05_C_RARE''_TSWORD_06_C_RARE''_TSWORD_07_C_RARE''_TSWORD_08_C_RARE''_TSWORD_09_C_RARE''_TSWORD_10_C_RARE',
'_DAGGER_01_C_RARE''_DAGGER_02_C_RARE''_DAGGER_03_C_RARE''_DAGGER_04_C_RARE''_DAGGER_05_C_RARE''_DAGGER_06_C_RARE''_DAGGER_07_C_RARE''_DAGGER_08_C_RARE''_DAGGER_09_C_RARE''_DAGGER_10_C_RARE',
'_DARKSTAFF_01_C_RARE''_DARKSTAFF_02_C_RARE''_DARKSTAFF_03_C_RARE''_DARKSTAFF_04_C_RARE''_DARKSTAFF_05_C_RARE''_DARKSTAFF_06_C_RARE''_DARKSTAFF_07_C_RARE''_DARKSTAFF_08_C_RARE''_DARKSTAFF_09_C_RARE''_DARKSTAFF_10_C_RARE',
'_HARP_01_C_RARE''_HARP_02_C_RARE''_HARP_03_C_RARE''_HARP_04_C_RARE''_HARP_05_C_RARE''_HARP_06_C_RARE''_HARP_07_C_RARE''_HARP_08_C_RARE''_HARP_09_C_RARE''_HARP_10_C_RARE',
'_SHIELD_01_C_RARE''_SHIELD_02_C_RARE''_SHIELD_03_C_RARE''_SHIELD_04_C_RARE''_SHIELD_05_C_RARE''_SHIELD_06_C_RARE''_SHIELD_07_C_RARE''_SHIELD_08_C_RARE''_SHIELD_09_C_RARE''_SHIELD_10_C_RARE',
'_AXE_01_C_RARE''_AXE_02_C_RARE''_AXE_03_C_RARE''_AXE_04_C_RARE''_AXE_05_C_RARE''_AXE_06_C_RARE''_AXE_07_C_RARE''_AXE_08_C_RARE''_AXE_09_C_RARE''_AXE_10_C_RARE',
'_TBLADE_01_C_RARE''_TBLADE_02_C_RARE''_TBLADE_03_C_RARE''_TBLADE_04_C_RARE''_TBLADE_05_C_RARE''_TBLADE_06_C_RARE''_TBLADE_07_C_RARE''_TBLADE_08_C_RARE''_TBLADE_09_C_RARE''_TBLADE_10_C_RARE',
'_BLADE_01_C_RARE''_BLADE_02_C_RARE''_BLADE_03_C_RARE''_BLADE_04_C_RARE''_BLADE_05_C_RARE''_BLADE_06_C_RARE''_BLADE_07_C_RARE''_BLADE_08_C_RARE''_BLADE_09_C_RARE''_BLADE_10_C_RARE',
'_BOW_01_C_RARE''_BOW_02_C_RARE''_BOW_03_C_RARE''_BOW_04_C_RARE''_BOW_05_C_RARE''_BOW_06_C_RARE''_BOW_07_C_RARE''_BOW_08_C_RARE''_BOW_09_C_RARE''_BOW_10_C_RARE',
'_SPEAR_01_C_RARE''_SPEAR_02_C_RARE''_SPEAR_03_C_RARE''_SPEAR_04_C_RARE''_SPEAR_05_C_RARE''_SPEAR_06_C_RARE''_SPEAR_07_C_RARE''_SPEAR_08_C_RARE''_SPEAR_09_C_RARE''_SPEAR_10_C_RARE',

);
$nigga str_replace($gogo$nigglet$output);

// Select new set,weapon,acc
$New mssql_query("SELECT * FROM _RefObjCommon where CodeName128 = '$nigga'");
while (
$PNew mssql_fetch_array($New)) {
echo 
$PNew['CodeName128'].'<br>';

// Lets test to update item.
mssql_query("UPDATE _Items SET RefItemID = '{$PNew['ID']}' WHERE ID64 = '{$PInventory['ItemID']}'");

// Lets give them +7 items :)
mssql_query("UPDATE _Items set OptLevel = '7' where ID64 = '{$PInventory['ItemID']}'");

      }
     }
    }
   }
  } 
 }
#}
?>
------------------------------------------------

Rewarding the fortress war winner guild(s) at a specific time that you choose:

PHP Code:
<?php
// Config
$silk "25"// How much silk to be given.
$day "Monday 00:00"// What day should we launch the script?

// Server connection!
mssql_connect("GALAXY-PC\SQLEXPRESS""sa""123456") or die("Database problem #1");

// Dont touch this.
$date date('l H:i');

// Dont touch the date, edit in the top.
if($date == $day) {
// Lets clean old guild winners
mssql_select_db("SRO_VT_ACCOUNT") or die("Database problem #2");
mssql_query("TRUNCATE TABLE guild_winners");

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_SHARD") or die("Database problem #2");
$checkGuilds mssql_query("select GuildID from _SiegeFortress where FortressID in (1, 3, 6)");
while(
$printGuild mssql_fetch_array($checkGuilds)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_SHARD") or die("Database problem #2");
$checkMembers mssql_query("select CharID from _GuildMember where GuildID = '{$printGuild['GuildID']}'");
while(
$printCharID mssql_fetch_array($checkMembers)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_SHARD") or die("Database problem #2");
$checkJID mssql_query("SELECT UserJID from _User where CharID = '{$printCharID['CharID']}'");
while(
$printJID mssql_fetch_array($checkJID)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT") or die("Database problem #2");
$checkUsername mssql_query("SELECT StrUserID from TB_User where JID = '{$printJID['UserJID']}'");
while(
$printUser mssql_fetch_array($checkUsername)) {
mssql_query("INSERT INTO guild_winners (username, silk, rewarded) VALUES('{$printUser['StrUserID']}', '$silk', 'false')");

// So some problems with duplicated !?
$mssql mssql_query("select username from guild_winners group by username having count(*) > 1");
while (
$mssrow mssql_fetch_array($mssql)) {

// duplicated solved, like a bawz.
if($mssrow) {
mssql_query("DELETE FROM guild_winners where username = '{$mssrow['username']}'");
}

// Lets insert the ones that was duplicated, but only ones this time :)
mssql_query("INSERT INTO guild_winners (username, silk, rewarded) VALUES('{$mssrow['username']}', '$silk', 'false')");

// Lets select all members from guild_winners :)
$final mssql_query("SELECT * FROM guild_winners");
while(
$finalPrint mssql_fetch_array($final)){

// Lets give them silk
mssql_query("exec CGI.CGI_WebPurchaseSilk 0,'{$finalPrint['username']}',0,'$silk',0");

// Lets update guild_winners and put rewarded = true
mssql_query("UPDATE guild_winners set rewarded = 'true' where username = '{$finalPrint['username']}'");


}
 }
  }
   } 
// If JID is not duplicated.
    
// Row
     
}
   } else {
echo 
"The date is not $day, it is $date";
?>
<meta http-equiv="refresh" content="30" />
<?php
}
?>
<meta http-equiv="refresh" content="120" />

--------------------------------

Giving Silk Reward to top 5 Unique hunters at a specific time that you choose
(Of course u will need chernobyl's patch [Evangelion] to record uniques kills in your database):

PHP Code:
<?php
// Config
$silk "500"// How much silk to be given.
$day "Saturday 00:21"// What day should we launch the script?

// Server connection!
mssql_connect("WIN-2HIH5B6MR53\SQLEXPRESS""sa""123456") or die("Database problem #1");

// Dont touch this.
$date date('l H:i');

// Dont touch the date, edit in the top.
if($date == $day) {

// Delete old unique_winners
// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT") or die("Database problem #2");
mssql_query("TRUNCATE TABLE unique_winners");

// Select TOP 5 from the Weekly uniques!
// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT") or die("Database problem #2");
$win mssql_query("SELECT top 5 CharName, count(CharName) as test from Evangelion_uniques where MobName in ('MOB_CH_TIGERWOMAN', 'MOB_EU_KERBEROS', 'MOB_AM_IVY', 'MOB_OA_URUCHI', 'MOB_KK_ISYUTARU', 'MOB_TK_BONELORD', 'MOB_RM_TAHOMET', 'MOB_TQ_WHITESNAKE' , 'MOB_JUPITER_JUPITER' , 'MOB_JUPITER_YUNO') AND time >= DATEADD(day,-7, GETDATE()) group by CharName order by test desc");
while(
$pwin mssql_fetch_array($win)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_SHARD");
$char mssql_query("SELECT CharID FROM _Char where CharName16 = '{$pwin['CharName']}'");
while(
$pchar mssql_fetch_array($char)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_SHARD");
$JID mssql_query("SELECT UserJID FROM _User where CharID = '{$pchar['CharID']}'");
while(
$pJID mssql_fetch_array($JID)) {

// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT");
$user mssql_query("SELECT StrUserID from TB_User where JID = '{$pJID['UserJID']}'");
while(
$puser mssql_fetch_array($user)) {


// Insert them into the unique_winners
// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT");
mssql_query("INSERT INTO unique_winners('charname', 'silk', 'rewarded') VALUES('{$pwin['CharName']}', '$silk', 'yes')");



// Lets give them silk
// Some problem with that mssql fixed here.
mssql_select_db("SRO_VT_ACCOUNT");
mssql_query("exec CGI.CGI_WebPurchaseSilk 0,'{$puser['StrUserID']}',0,'$silk',0");




    } 
// End $puser
   
// End $pJID
  
// End $pchar
 
// End $pwin
} else {
echo 
"The date is not $day, it is $date";
?>
<meta http-equiv="refresh" content="30" />
<?php
// END SCRIPT
?>
<meta http-equiv="refresh" content="120" />
------------------------------

Silk per hour script ( the easiest way - You will need Caipi's database queries for silk/hour to be able to use this script which is easier and easy to be modified ):

PHP Code:
<?php
mssql_connect
("WIN-2HIH5B6MR53\SQLEXPRESS""sa""123456") or die("Database problem #1");
mssql_select_db("SRO_VT_SHARDLOG") or die("Database problem #2");
mssql_query("DELETE FROM dbo._OnlineOffline where Status = 'Offline'");
mssql_query("DELETE FROM dbo._OnlineOffline where Status = 'OnHold'");

$result mssql_query("SELECT * FROM dbo._OnlineOffline where Minutes = '60' AND Status = 'Online'") or die("Database problem #3");
while(
$row mssql_fetch_array($result)) {

mssql_select_db("SRO_VT_SHARD");
$CharID mssql_query("SELECT UserJID FROM dbo._User where CharID = '{$row['CharID']}'");
while(
$Chars mssql_fetch_array($CharID)) {

mssql_select_db("SRO_VT_ACCOUNT");
$StrUserID mssql_query("SELECT StrUserID FROM TB_User where JID = '{$Chars['UserJID']}'");
while(
$Accounts mssql_fetch_array($StrUserID)) {
mssql_query("exec CGI.CGI_WebPurchaseSilk 0,'{$Accounts['StrUserID']}',0,'1',0");


mssql_select_db("SRO_VT_SHARDLOG");
mssql_query("UPDATE dbo._OnlineOffline set Minutes = '0' where Charname = '{$row['Charname']}'");
  }
 }
}
?>
<meta http-equiv="refresh" content="60" />
--------------------------------

All those PHP scripts can be edited as you desire with basic php knowledge

Peace

More will be coming soon
sofka30 is offline  
Thanks
7 Users
Old 03/17/2014, 02:38   #2
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,398
Received Thanks: 6,509
#Approved
PortalDark is offline  
Old 03/17/2014, 03:36   #3
 
denise456's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 397
Received Thanks: 87
where query for creat table?
denise456 is offline  
Old 03/17/2014, 07:00   #4
 
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,196
good job , thanks !
Crue* is offline  
Old 03/17/2014, 13:21   #5
 
sofka30's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 112
Received Thanks: 31
Quote:
Originally Posted by denise456 View Post
where query for creat table?
I thought u can do it by yourself .. anyway I will add the query for creating all the required tables later tonight or tomorrow when I get free time ..

or

you can just download ReviveSRO database from this thread and get the tables queries yourself from it ..
the required database tables will be located in ( SRO_VT_ACCOUNT / SRO_VT_SHARDLOG )

Peace
sofka30 is offline  
Thanks
1 User
Old 03/17/2014, 13:24   #6
 
denise456's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 397
Received Thanks: 87
Thank's
denise456 is offline  
Old 03/17/2014, 13:58   #7
 
gigola123's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 722
Received Thanks: 390
That mean you'll need to open a php script all the day ?!

Btw for auto refresh you can make that in one ajax page, which load the reste without problem. But sql profiler have thing for that, that will be better than php script !
gigola123 is online now  
Old 03/21/2014, 12:52   #8
 
elite*gold: 50
Join Date: Mar 2013
Posts: 1,153
Received Thanks: 412
USEFUL.
asanoftw is offline  
Old 03/21/2014, 14:23   #9
 
Justin1337*'s Avatar
 
elite*gold: 480
Join Date: Jan 2012
Posts: 655
Received Thanks: 579
Thank you. =)
Justin1337* is offline  
Reply


Similar Threads Similar Threads
Python scripts injection blocked
08/08/2013 - Metin2 Private Server - 0 Replies
Hello people! I've to hack in a server but this server have blocked Python scripts injection How can i bypass this??? Nothing???!!?
[Release] Action 10 Private Server Scripts
10/28/2012 - Dekaron PServer Hacks, Bots, Cheats & Exploits - 0 Replies
How to update blocks Example: Block1 0xE2F4D966 Now It can be for any of these hacks autopots,vac,non agrro, or even vac. Take the line given below like (Health Potion,0,0,1,0,1,37,1111-1111-1111-1111-1111-1111- 1111-1111) Search for it in winhex once you find highlight it. Look at bottom of winhex it will show something like (Offset: E2F4D966) Take this NEW offset and replace it in the block leave the (0x) alone. Press save drag the csv file into your pack.d00 or data.pack file that should...
inputs that may help the server shuts down?
07/27/2012 - Metin2 Private Server - 0 Replies
inputs that may help the server shuts down?
[RELEASE] Usefull Server Scripts
03/02/2010 - EO PServer Guides & Releases - 9 Replies
Hey everyone as there isnt many admin type releases i thought id put some up to help out the newer server developers out there. here is a list of the scripts to follow: Palladin Potion Soul bug fix, Set players gear to full bonus, Bot jail a player, Open all totems, Staff ep and pp award, banned player and cheat log table' (php web page for it soon)



All times are GMT +1. The time now is 21:31.


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.