الموقع العربي الاول للعبة Silkroad Online

الموقع العربي الاول للعبة Silkroad Online (https://silkroad4arab.com/vb/index.php)
-   قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة (https://silkroad4arab.com/vb/forumdisplay.php?f=289)
-   -   New Vote4Silk system (https://silkroad4arab.com/vb/showthread.php?t=461192)

N00b™ 02-11-2012 11:42 PM

New Vote4Silk system
 
كود PHP:

USE [SRO_VT_ACCOUNT]
GO

/****** Object:  Table [dbo].[Coints]    Script Date: 11/02/2012 15:00:06 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE 
[dbo].[Coints](
    [
LoginID] [varchar](maxNULL,
    [
coints] [varchar](maxNULL
ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO 


Other Files
http://www.mediafire.com/?tr3vrvwj5u36kc4
كود PHP:

الشرح
How to
:
First you will need an Login Panel who is using $userID $_SESSION['name'];
Insert into the DB DB.txt
Change
$serverIp 
"local";
$userName "sa";
$password "PW";
$dbName1 "SRO_VT_ACCOUNT";
$dbName2 "SHARD";
to your data


How to add items
:
You will see in buy.php


echo 'Global 10x<br />'//Item
echo '<img src="img/global.jpg" title="Global" /><br />'//Image
echo 'Price: 10coints<br />'//Cost
print " //Select char start
<b>Select Char</b>
<br />
<form name='form' method='post' action='?Item'>
<select name='CharName'>
<option value='
$CharNAME'>$CharNAME</option>
<option value='
$CharNAME1'>$CharNAME1</option>
<option value='
$CharNAME2'>$CharNAME2</option>
</select>
<input type='submit' class='button' value='Buy' name='item1' /> //name='item1' is needed for item.php
</form>
"
//Select char end
echo ' <br />';



Just change all this things for new item

Now item
.php

if (isset($_POST['item1'])) { //item1 from the buy.php





if ($coint 9) { //how much coints its cost -1


mssql_query("update Coints set coints = coints - 10 where loginid = '$userID'"); //Delete coints from DB how much its cost

mssql_select_db($dbName2$dbConn) or die ("Couln't select database $dbName1");
mssql_query("exec _ADD_ITEM_EXTERN '$Char','ITEM_EVENT_RENT_GLOBAL_CHATTING',10,1"); //$Char,item,units,item option level


echo "Succesfull buyed item pls check your inventory for the item";


}else{
echo 
"You have not enugh coints";
}

}


If 
you want to add a new item you will need to change name='item1' and if (isset($_POST['item1'])) { lets we say you have added already 9 items then you will need for the next item name='item10' and if (isset($_POST['item10'])) {


Where i get the icons?
Go into your media then icons item etc..... 


™Anas™ 03-11-2012 12:07 AM

فين الشرح ياعسل

CriZ 03-11-2012 03:30 PM

فين الشرح يا عسلية:mfr_bl1:
:vincent:

N00b™ 03-11-2012 06:11 PM

Done :biggrin2:

Snow* 03-11-2012 06:27 PM

did u test it

Tigger 14-05-2014 09:31 AM

تسلم:gun2:

H2O 15-05-2015 06:00 PM

رد: New Vote4Silk system
 
ازاي اركبه علي السايت

CritYouDown 17-05-2015 04:06 PM

رد: New Vote4Silk system
 
االله ينور فينك من زمان
جارى التجربه

Hamboka 17-05-2015 10:52 PM

رد: New Vote4Silk system
 
تسلم

MR D.B 19-05-2015 12:15 AM

رد: New Vote4Silk system
 
nice work


الساعة الآن 04:10 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.