
oxidati0n
Members-
Posts
564 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by oxidati0n
-
Re: Phaos Game Engine :wink: ok
-
Re: Phaos Game Engine Well Scarlet if your looking to host/design over 10 websites It's best to get a dedicated.. Advantages 1) Your in FULL control 2) Your account cannot get suspended (dependant on company) 3) You control the looks and design 4) You can modify and upgrade your control Most Dedicated Server Sellers offer a choice of: DirectAdmin, Plesk or cPanel :) Great and Efficient, My advice to you..Because i know it'll work because I'm using it :) -Best Plans @ www.hostgator.com Kind of financially expensive, but very reliable. The only thing is they keep up-to-date on the hosting bills :P
-
Re: !FREE ****Buy Items with Crystals****** FREE! Fixed the bug with admin.php - Should you redo all the instructions it should work great. :)
-
Re: !FREE ****Buy Items with Crystals****** FREE! Also this modification hasn't been tested but i'm sure 98% that it'd work.
-
Re: !FREE ****Buy Items with Crystals****** FREE! If you use this mod please review it - Any reviews would be appreciated. :)
-
This doesn't work for V2 since V2 has a totally modified Item database! Now i have been generous enough to do this, So enjoy! Here it is..The mod you all have been waiting for! This modification makes sure your items can be bought for crystals instead of cash Execute Query ALTER TABLE `items` ADD `itm_place` ENUM('cash','crystals') NOT NULL ; find in shops.php where it says print "\n{$r['itmname']}{$r['itmdesc']}\${$r['itmbuyprice']}\${$r['itmsellprice']}Qty: "; replace with if($r["itm_place"] == "cash") { $gross="\$".number_format($r['itmbuyprice']); $sellgross="\$".number_format($r['itmsellprice']); } else { $gross=number_format($r['itmbuyprice'])." crystals"; $sellgross=number_format($r['itmsellprice'])." crystals"; } print "\n{$r['itmname']}{$r['itmdesc']}$gross$sellgrossQty: "; next find in itembuy.php where it says $itemd=mysql_fetch_array($q); if($ir['money'] < $itemd['itmbuyprice']*$_POST['qty']) { print "You don't have enough money to buy this item!"; $h->endpage(); exit; } if($itemd['itmbuyable'] == 0) { print "This item can't be bought!"; $h->endpage(); exit; } $price=($itemd['itmbuyprice']*$_POST['qty']); mysql_query("INSERT INTO inventory VALUES('',{$_GET['ID']},$userid,{$_POST['qty']});",$c); mysql_query("UPDATE users SET money=money-$price WHERE userid=$userid",$c); mysql_query("INSERT INTO itembuylogs VALUES ('', $userid, {$_GET['ID']}, $price, {$_POST['qty']}, unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')", $c); print "You bought {$_POST['qty']} {$itemd['itmname']}(s) for \$$price"; replace with $itemd=mysql_fetch_array($q); if($itemd["itm_place"] == "cash") { $type="money"; } else { $type="crystals"; } if($ir[$type] < $itemd['itmbuyprice']*$_POST['qty']) { print "You don't have enough $type to buy this item!"; $h->endpage(); exit; } if($itemd['itmbuyable'] == 0) { print "This item can't be bought!"; $h->endpage(); exit; } $price=($itemd['itmbuyprice']*$_POST['qty']); if($itemd["itm_place"] == "cash") { $gross="\$".number_format($itemd['itmbuyprice']); } else { $gross=number_format($itemd['itmbuyprice'])." crystals";} mysql_query("INSERT INTO inventory VALUES('',{$_GET['ID']},$userid,{$_POST['qty']});",$c); mysql_query("UPDATE `users` SET `$type` = `$type` - '$price' WHERE `userid` = '$userid'",$c); mysql_query("INSERT INTO itembuylogs VALUES ('', $userid, {$_GET['ID']}, $price, {$_POST['qty']}, unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')", $c); print "You bought {$_POST['qty']}x {$itemd['itmname']}(s) for $gross"; Next open up in admin.php and find where it says If you know this it is in function new_item_form() Item Buyable: Item Price: Item Sell Value: add above Item Currency: CashCrystals find later in the admin.php where it says This should be the function new_item_submit() $m=mysql_query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy)",$c) or die(mysql_error()); replace with mysql_query("INSERT INTO `items` (`itmid`, `itmtype`, `itmname`, `itmdesc`, `itmbuyprice`, `itmsellprice`, `itmbuyable`, `itm_place`) VALUES ('NULL', '$_POST[itmtype]', '$itmname', '$itmdesc', '$_POST[itmbuyprice]', '$_POST[itmsellprice]', '$itmbuy','$_POST[itm_place]');",$c) or die(mysql_error()); There your done! It should function now. Any force you give will be very appreciated. Nick.
-
Re: Getting Rid of the 2.147 bil cap in MCcode to remove the 2.147 bil cap ALTER TABLE `users` ADD `money` BIGINT( 45 ) UNSIGNED NOT NULL ; unsigned means it's normal flow cash, no repeat in 2.147 rows if you get me.
-
Re: Guess the next poster nope it's me..Scarlet next
-
Re: No Database Selected it should be tht should work. mysql_select_db("fallen_DBNAME",$c);
-
Re: [mccode] Close page system lol posts dont count as time, it means how much waste posts they make (proberly) I personally purchasing a badge means your loyal and willing to spend money to show others your not some dumbass.
-
Re: [mccode] Attack.php addons in that bit just add $_SESSION['attacking']=0; solved ignite.
-
Re: [Free] Password reset code Nice..At least it isn't all in one crappy one. +1 for at least posting it.
-
Re: Ruby Trader Mod FREE!!! V2 That means every 50 days somebody gets a will potion? Nice mod contribution, Looks like you have put a ot of effort into it.
-
Re: Mini Coding Contests Nice piece of code. lol ;)
-
Re: A way to protect against sql injection Yup that has nothing to do with it... BTW it would save you lots of time if you just did array(); or $r="table name"; $_POST[$r]=str_replace(blahblah); to save people time from editing. Functions tend to save more time and easier to make more edits to. But by the way...It's nothing to do with SQL Injections.. I don't see anything to do with DB there lol.
-
Re: Honor Awards v2 Talking about webdesign wait until you see my game released.
-
Re: NEW!! Advanced House Break-In Nice..do you get an item every time..It should be a random (or level/stat speed/agility thing) would bring more attraction ;) ooo..losing a $50 pack..I felt for that guy :P lol.
-
Re: [mccode] Basic Criminal Record I made the mod in my own version but mine prints the crime group name aswell, dont know if that helps lol. ;)
-
Re: How to fix "Cannot Connect to Socket mysql.lib" Errors! But if it comes around..It's here. ;) I use to have it with my windows webserver, but changed to linux.. --Plus if you ever get a choice of picking Windows or Linux..Be sure to pick Linux..More speedy and reliable! Did you know? CPanel X is run by linux, thats why you get the most speed at a high range. It may not be "the fastest" but trust me, It could be a lot more slower!
-
Re: Awesome 1st step to email validation. nice but its a bit too long for just a email validation.
-
Re: More fun Nice contribution and very descriptive/understandable. Thumps Up! ;)
-
If you ever get an error including the message "Error: Cannot connect to Socket through '/mysql/socket/mysql.lib' on mysql.php on line 3" It's no PHP error, It's a MySQL breakdown error. To resolve this error: 1. Login into your CPanel/DirectAdmin/Plesk/Wamp Server (CPanel = 2082) (Plesk = 6505) 2. Click MySQL Databases/SQL Manager 3. Find your database name and click 'Repair'. If it cannot find the error through there, Then it obviously is a server messup. Reboot from the main server socket would easy fix this.. If you are your own host, (Dedicated Only) You can reboot it. Reseller's are created from Dedicated so they are not acceptable as a rebooter. If you require any assistance PM me, Nick.
-
Re: [Free v1 & v2] Advanced Gang Logs I remodified my engine because all the logs were messed up, Now its a log-collecter destroy machine lol. :)
-
Re: Basic Criminal Record nice, Looks good.