|
You last visited: Today at 19:28
Advertisement
[Release][PHP]Lucky Box
Discussion on [Release][PHP]Lucky Box within the Fiesta Online forum part of the MMORPGs category.
04/23/2013, 19:32
|
#1
|
elite*gold: 3
Join Date: Mar 2010
Posts: 551
Received Thanks: 372
|
[Release][PHP]Lucky Box
Hallo,
ich habe da was in einen meiner Ordner gefunden, was schon ein bisschen älter ist.
Es ist ein kleines Lucky Box script, was zwischen einer zahl (0-7) nochmal eine randome zahl generiert, damit die Trefferquote auf die Zahl zwischen 0-7 niedriger ist.
Es basiert noch auf die alten Files (2008), also müsst ihr noch selbst Sachen im Script bearbeiten. Außerdem müsst ihr eine Tabelle nachbauen, wovon ich leider kein Backup mehr habe. (Ist aber easy  ).
Viel Spaß
Code:
<h1>Lucky Box</h1>
<p>
<?php
//Script by Canic 2012
if ( $__TOKEN == 'xxxx' )
{
if($_SESSION['logged_in'] == '')
{
showMessage( 'info', 'Session terminated!' );
}else{
if ( $_POST['Get'] )
{
$mssql_link = mssql_connect( $xx, $xx, $xx );
if ( !$mssql_link )
{
showMessage( 'info', 'Registration is temporarly offline' );
}
else
{
$orderNumber = mssql_escape_string( $_POST['orderNumber'] );
$insertItem = mssql_query( "INSERT INTO Account..tChargeItem(orderNo, userNo, goodsNo) VALUES(CAST(RAND() * 1000000 AS INT), '".$_SESSION['userID']."', '$orderNumber');" );
showMessage( 'success', 'The Item is now in your Cashshop Inventory!', 2, 'index.php?module=news');
}
}
else if ( $_POST['Submit'] )
{
$mssql_link = mssql_connect( $xx, $xx, $xx );
$AccountCoins = mssql_query("SELECT * FROM Account..tUser WHERE nUserNo = '".$_SESSION['userID']."' AND nNCoin >= '2';");
$accountFetch = mssql_fetch_array($AccountCoins);
if (mssql_num_rows($AccountCoins) == 1)
{
mssql_query("UPDATE Account..tUser SET nNCoin = nNCoin - '2' WHERE nUserNo = '".$_SESSION['userID']."';");
$count2 = mssql_query("SELECT * FROM Account..tNanOBox");
$count = mssql_num_rows($count2);
$randome = mt_rand(1, $count);
if ($randome >= 8)
{
$randome2 = mt_rand(0, 7);
$randome = $randome - $randome2;
$selectedItem = mssql_query("SELECT * FROM Account..tNanOBox WHERE No = '$randome';");
$item = mssql_fetch_array($selectedItem);
showMessage( 'success', '<center>You have earned: '.$item['description'].'<br /> <br /> <img src="http://www.elitepvpers.com/forum/images/mall/'.$item['img'].'.jpg" /><br /><form method="post"><input type="hidden" name="orderNumber" value="'.$item['goodsNo'].'" /><input type="submit" name="Get" value="Get the Item" /></form><br /><br /><a href="index.php?module=NaNLucky">Lucky Box</a></center>' );
}
else
{
$selectedItem = mssql_query("SELECT * FROM Account..tNanOBox WHERE No = '$randome';");
$item = mssql_fetch_array($selectedItem);
showMessage( 'success', '<center>You have earned: '.$item['description'].'<br /> <br /> <img src="http://www.elitepvpers.com/forum/images/mall/'.$item['img'].'.jpg" /><br /><form method="post"><input type="hidden" name="orderNumber" value="'.$item['goodsNo'].'" /><input type="submit" name="Get" value="Get the Item" /></form><br /><br /><a href="index.php?module=NaNLucky">Lucky Box</a></center>' );
}
}
else
{
showMessage( 'error', 'Sorry :( You can play with a minimum of 2 NanO Coins!' );
}
}
else
{
?>
Welcome to our Lucky Box! One round = 2 NanO Coins! Currently you have <?php $AccountCoins = mssql_query("SELECT * FROM Account..tUser WHERE nUserNo = '".$_SESSION['userID']."';"); $accountFetch = mssql_fetch_array($AccountCoins); echo $accountFetch['nNCoin'].' NanO Coins' ; ?>
<br />
<br />
<form method="post">
<table width="400px">
<tr>
<td>
Good Luck :)
</td>
<td><input type="submit" name="Submit" value="Submit" /></td>
</tr>
</table>
</form>
<?php
}
}
}
?>
|
|
|
 |
Similar Threads
|
[RELEASE]Grufti HP Design by Lucky
10/22/2011 - Metin2 PServer Guides & Strategies - 17 Replies
Höhö okay ich hab grad echt nichts besseres zu tun
gehabt als ne PSD zu machen, ist Geschmackssache
bei diesem Design, auch wenn ich weiß das sie zu 98%
nicht bescriptet wird, kanns ja trotzdem nicht schaden
es mit euch zu teilen.
Saß nur ne Stunde drann, also siehts auch dementsprechend
aus und ja .. die Schriften und so ihr PhP'ler wisst ja
sind sowieso überflüssig also eigl. nur das Design betrachten.
Feedback's wie Lob oder Kritik gern gesehen.
|
[RELEASE]Dungeonquest by Lucky
10/19/2011 - Metin2 PServer Guides & Strategies - 14 Replies
Ja ich saß ewigkeiten drann sodass sie echt bei jedem
funktionieren MÜSSEN ! Egalo welche SF jemand hat.
Sprich es sind ältere als 2010 da hab ichs nicht getestet.
2010/2011 funzt perfekt.
Also mal zur Quest beschreibungen was zu tun ist
Zu Quest 1, ihr müsst zu eurem NPC gehen
und dem NPC ein Item bringen und dafür hingegen
|
[Request] Hack for lucky streak/ lucky mode
03/27/2011 - Perfect World - 3 Replies
Is it possible to hack pwi, and give your self a lucky streak?
To get it the hard way you have to find Duke Blacke, keep talking to him until he tells u a certain gem merchant is feeling lucky. You go and trade with gem merchant, and then u have a chance to get a lucky streak. Some people say that there's a 5% chance that will happen, but im not sure about the credibility.
Also the lucky streak lasts untill u log off, and it will crit all lucky packs u get and stuff. I was just thinking it...
|
[]Release[] My First Lucky Time. (Skull)
12/17/2010 - CO2 Weapon, Armor, Effects & Interface edits - 9 Replies
This is My first Shot at Lucky Time. Let Me Know if you like it please!!
http://i54.tinypic.com/24141ap.jpg
Thanks For The Feed Back in Advance
|
[Release?]Lucky Time
11/17/2008 - CO2 PServer Guides & Releases - 24 Replies
sup guyz i downloaded the conquer source that works with the old client and i made lucky time in it, many ppl search for this now i'm asking
Should I release it? Make it public ?
if the most of ppl say yes then i'll release it.
Goodbye.
|
All times are GMT +1. The time now is 19:32.
|
|