
benlakaz
Members-
Posts
38 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by benlakaz
-
I just finished coding this textbase game after almost two months. The concept of this game is most likely like mafia wars. http://www.crimerealm.com Hope to see you there.
-
Re: Weapon with stats What code should i add here to make the item when equip add stats.. thanks in advance <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['weapon']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_primary", "equip_secondary"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Weapon</h3><hr /> <form action='equip_weapon.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory. <input type='radio' name='type' value='equip_primary' checked='checked' /> Primary <input type='radio' name='type' value='equip_secondary' /> Secondary <input type='submit' value='Equip Weapon' /></form>"; } $h->endpage(); ?>
-
Hello to All, Is there any mod that when a user equip weapon there will be additional stat bonus. For example when you equip a sword you get 100 agility. Thanks in advance..
-
Re: Battletent [V2] works perfectly
-
Re: Gang Surrender thanks thedestroyer.. +1 for you
-
Hello to All, Pls help me with this error that I received when I accept Gang Surrenders. QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT * FROM gangwars where warID= What part should I edit in this area.. Thanks in advance.. function gang_staff_viewsurrenders() { global $db,$ir,$c,$userid,$gangdata; if(!isset($_POST['subm'])) { print "<form action='yourgang.php?action=staff&act2=viewsurrenders' method='post'> Choose who to accept the surrender from. <input type='hidden' name='subm' value='submit' /> Gang: <select name='sur' type='dropdown'>"; $wq=$db->query("SELECT s.*,w.* FROM surrenders s LEFT JOIN gangwars w ON s.surWAR=w.warID WHERE surTO={$ir['gang']}"); while($r=$db->fetch_row($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); print "<option value='{$r['surID']}'>War vs. {$them['gangNAME']} (Msg: {$r['surMSG']})</option>"; } print "</select> <input type='submit' value='Accept Surrender' /></form>"; } else { $_POST['sur'] = abs((int) $_POST['sur']); $q=$db->query("SELECT surWAR FROM surrenders WHERE surID={$_POST['sur']}"); list($_POST['war']) = $db->fetch_row($q); $wq=$db->query("SELECT * FROM gangwars where warID={$_POST['war']}"); $r=$db->fetch_row($wq); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("DELETE FROM surrenders WHERE surID={$_POST['sur']}"); $db->query("DELETE FROM gangwars WHERE warID={$_POST['war']}"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] have accepted the surrender from [url='gangs.php?action=view&ID={$them[']{$them['gangNAME']}[/url], the war is over!"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')"); print "You have accepted surrender, the war is over."; }
-
Can anyone help me about ipn_donator?? I want to make only 2 donator packs.. $5 pack 50 crystals, 30 days donator status, 50 IQ, $10 pack 110 Crystals, 70 days donator status, 110IQ, Please generate the code for this.. Thanks in advance...
-
Please assist me with this cron.. What part should I edit to reduce the daily profit of the business... thanks <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } include "global_func.php"; $select_businesses = mysql_query("SELECT * FROM `businesses` LEFT JOIN `businesses_classes` ON (`classId` = `busClass`) ORDER BY `busId` ASC"); while($bs = mysql_fetch_assoc($select_businesses)) { $amount = mysql_num_rows(mysql_query(sprintf("SELECT * FROM `businesses_members` WHERE `bmembBusiness` = '%u'", $bs['busId']))); $new_customers = ((($bs['classCost'] / 7000) * ($amount + 1) + rand(-12, 9)) / 2); $new_profit = (($new_customers + rand(-4, 8)) * ((($bs['classCost'] / 2500) * rand(2, 8)) / 10) * ($amount + 1)); mysql_query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit + $bs['busCash']), $bs['busId'])) OR die('Cron not run'); $fetch_members = mysql_query(sprintf("SELECT * FROM `businesses_members` LEFT JOIN `users` ON (`userid` = `bmembMember`) LEFT JOIN `businesses_ranks` ON (`rankId` = `bmembRank`) WHERE `bmembBusiness` = '%u'", $bs['busId'])); while($fm = mysql_fetch_assoc($fetch_members)) { $fetch_stat = array( 'strength' => 'strength', 'intel' => 'IQ', 'labour' => 'labour' ); mysql_query(sprintf("UPDATE `users` SET `money` = `money` + '%d' WHERE `userid` = '%u'", $fm['bmembCash'], $fm['userid'])); mysql_query(sprintf("UPDATE `userstats` SET `{$fetch_stat[$fm['rankPrim']]}` = `{$fetch_stat[$fm['rankPrim']]}` + '%.6f', `{$fetch_stat[$fm['rankSec']]}` = `{$fetch_stat[$fm['rankSec']]}` + '%.6f' WHERE (`userid` = '%u')", $fm['rankPGain'], $fm['rankSGain'], $fm['userid'])); if($bs['busCash'] < $fm['bmembCash']) { $text = "Member ID {$fm['bmembMember']} was not paid their \$".number_format($fm['bmembCash'])." due to lack of funds."; mysql_query(sprintf("INSERT INTO `businesses_alerts` (`alertId`, `alertBusiness`, `alertText`, `alertTime`) VALUES ('NULL', '%u', '%s', '%d')", $bs['busId'], $text, time())); mysql_query(sprintf("UPDATE `businesses` SET `busDebt` = `busDebt` + '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } else { mysql_query(sprintf("UPDATE `businesses` SET `busCash` = `busCash` - '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } } if($bs['busDebt'] > $bs['classCost']) { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId'])); while($se = mysql_fetch_assoc($send_event)) { $text = "The {$bs['busName']} business went bankrupt\, all members have been discharged."; insert_event($se['bmembMember'], $text); } mysql_query(sprintf("DELETE FROM `businesses_members` WHERE (`bmembBusiness` = '%u')", $bs['busId'])); mysql_query(sprintf("DELETE FROM `businesses` WHERE (`busId` = '%u')", $bs['busId'])); } } ?>
-
Re: Businesses Mod [Mccode V2] hello, I just want to ask what part of this code should I change to decrease the daily income of each company?? because it makes a lot of profit everyday.. Thanks in advance.. <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } include "global_func.php"; $select_businesses = mysql_query("SELECT * FROM `businesses` LEFT JOIN `businesses_classes` ON (`classId` = `busClass`) ORDER BY `busId` ASC"); while($bs = mysql_fetch_assoc($select_businesses)) { $amount = mysql_num_rows(mysql_query(sprintf("SELECT * FROM `businesses_members` WHERE `bmembBusiness` = '%u'", $bs['busId']))); $new_customers = ((($bs['classCost'] / 5000) * ($amount + 1) + rand(-12, 18)) / 2); $new_profit = (($new_customers + rand(-4, 8)) * ((($bs['classCost'] / 2500) * rand(2, 8)) / 10) * ($amount + 1)); mysql_query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = `busCash` + '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit - $bs['busCash']), $bs['busId'])) OR die('Cron not run'); $fetch_members = mysql_query(sprintf("SELECT * FROM `businesses_members` LEFT JOIN `users` ON (`userid` = `bmembMember`) LEFT JOIN `businesses_ranks` ON (`rankId` = `bmembRank`) WHERE `bmembBusiness` = '%u'", $bs['busId'])); while($fm = mysql_fetch_assoc($fetch_members)) { $fetch_stat = array( 'strength' => 'strength', 'intel' => 'IQ', 'labour' => 'labour' ); mysql_query(sprintf("UPDATE `users` SET `money` = `money` + '%d' WHERE `userid` = '%u'", $fm['bmembCash'], $fm['userid'])); mysql_query(sprintf("UPDATE `userstats` SET `{$fetch_stat[$fm['rankPrim']]}` = `{$fetch_stat[$fm['rankPrim']]}` + '%.6f', `{$fetch_stat[$fm['rankSec']]}` = `{$fetch_stat[$fm['rankSec']]}` + '%.6f' WHERE (`userid` = '%u')", $fm['rankPGain'], $fm['rankSGain'], $fm['userid'])); if($bs['busCash'] < $fm['bmembCash']) { $text = "Member ID {$fm['bmembMember']} was not paid their \$".number_format($fm['bmembCash'])." due to lack of funds."; mysql_query(sprintf("INSERT INTO `businesses_alerts` (`alertId`, `alertBusiness`, `alertText`, `alertTime`) VALUES ('NULL', '%u', '%s', '%d')", $bs['busId'], $text, time())); mysql_query(sprintf("UPDATE `businesses` SET `busDebt` = `busDebt` + '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } else { mysql_query(sprintf("UPDATE `businesses` SET `busCash` = `busCash` - '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } } if($bs['busDebt'] > $bs['classCost']) { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId'])); while($se = mysql_fetch_assoc($send_event)) { $text = "The {$bs['busName']} business went bankrupt\, all members have been discharged."; insert_event($se['bmembMember'], $text); } mysql_query(sprintf("DELETE FROM `businesses_members` WHERE (`bmembBusiness` = '%u')", $bs['busId'])); mysql_query(sprintf("DELETE FROM `businesses` WHERE (`busId` = '%u')", $bs['busId'])); } } ?>
-
Re: Please review this game Demo Account username: demo password: demo
-
Hello everybody.. Can you please leave comments and reviews about this game.. Thanks Neomafia.Net
-
Re: Game Security can u secure my game?? :-D
-
Re: Game Security oh?? you will do it for free and still needs to sign a document? why?
-
Re: Game Security do you want me to help you securing your game??? :-) :-) I can do it for you
-
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
benlakaz replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error hey man.. its now ok.. thanks for the help -
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
benlakaz replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error same error.. thanks.. what's missing? -
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
benlakaz replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error pls help.. im receiving this error Parse error: syntax error, unexpected '}' in /home/aaa/public_html/forums.php on line 351 whats the problem with this code? function deletopic() { global $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $db->query("DELETE FROM forum_topics WHERE ft_id={$_GET['topic']}"); $db->query("DELETE FROM forum_posts WHERE fp_topic_id={$_GET['topic']}"); print "Deleting topic... Done "; stafflog_add("Deleted topic {$topic['ft_name']}");recache_forum($topic['ft_forum_id']); } thanks -
Re: Businesses Mod [Mccode V2] sorry for my last post.. i saw the difference now.. thanks again
-
Re: Businesses Mod [Mccode V2] thanks radio.. but i cant see any difference with that code.. can u tell me whats the difference.. thank you
-
Advance Race mod (Race run every 10mins) ($10)
benlakaz replied to benlakaz's topic in Paid Modifications
Re: Advance Race mod (Race run every 10mins) ($10) ok guys.. I have just replied in your pm's.. just inform me.. thanks -
Re: Businesses Mod [Mccode V2] Hello guys, Whats the problem with this cron I copied in the 1st page of this topic.. Business Vault is always equal to business latest profit.. Business latest profit does not add to business vault.. its always equal.. for example.. your vault yesterday is $1,400.. then today the latest business proft is $800.. so your vault should be $2200.. but its not.. its equal to $800.. Thanks in advance.. <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } include "global_func.php"; $select_businesses = mysql_query("SELECT * FROM `businesses` LEFT JOIN `businesses_classes` ON (`classId` = `busClass`) ORDER BY `busId` ASC"); while($bs = mysql_fetch_assoc($select_businesses)) { $amount = mysql_num_rows(mysql_query(sprintf("SELECT * FROM `businesses_members` WHERE `bmembBusiness` = '%u'", $bs['busId']))); $new_customers = ((($bs['classCost'] / 5000) * ($amount + 1) + rand(-12, 18)) / 2); $new_profit = (($new_customers + rand(-4, 8)) * ((($bs['classCost'] / 2500) * rand(2, 8)) / 10) * ($amount + 1)); mysql_query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = `busCash` + '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit - $bs['busCash']), $bs['busId'])) OR die('Cron not run'); $fetch_members = mysql_query(sprintf("SELECT * FROM `businesses_members` LEFT JOIN `users` ON (`userid` = `bmembMember`) LEFT JOIN `businesses_ranks` ON (`rankId` = `bmembRank`) WHERE `bmembBusiness` = '%u'", $bs['busId'])); while($fm = mysql_fetch_assoc($fetch_members)) { $fetch_stat = array( 'strength' => 'strength', 'intel' => 'IQ', 'labour' => 'labour' ); mysql_query(sprintf("UPDATE `users` SET `money` = `money` + '%d' WHERE `userid` = '%u'", $fm['bmembCash'], $fm['userid'])); mysql_query(sprintf("UPDATE `userstats` SET `{$fetch_stat[$fm['rankPrim']]}` = `{$fetch_stat[$fm['rankPrim']]}` + '%.6f', `{$fetch_stat[$fm['rankSec']]}` = `{$fetch_stat[$fm['rankSec']]}` + '%.6f' WHERE (`userid` = '%u')", $fm['rankPGain'], $fm['rankSGain'], $fm['userid'])); if($bs['busCash'] < $fm['bmembCash']) { $text = "Member ID {$fm['bmembMember']} was not paid their \$".number_format($fm['bmembCash'])." due to lack of funds."; mysql_query(sprintf("INSERT INTO `businesses_alerts` (`alertId`, `alertBusiness`, `alertText`, `alertTime`) VALUES ('NULL', '%u', '%s', '%d')", $bs['busId'], $text, time())); mysql_query(sprintf("UPDATE `businesses` SET `busDebt` = `busDebt` + '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } else { mysql_query(sprintf("UPDATE `businesses` SET `busCash` = `busCash` - '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])); } } if($bs['busDebt'] > $bs['classCost']) { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId'])); while($se = mysql_fetch_assoc($send_event)) { $text = "The {$bs['busName']} business went bankrupt\, all members have been discharged."; insert_event($se['bmembMember'], $text); } mysql_query(sprintf("DELETE FROM `businesses_members` WHERE (`bmembBusiness` = '%u')", $bs['busId'])); mysql_query(sprintf("DELETE FROM `businesses` WHERE (`busId` = '%u')", $bs['busId'])); } } ?>
-
Advance Race mod (Race run every 10mins) ($10)
benlakaz replied to benlakaz's topic in Paid Modifications
Re: Advance Race mod (Race run every 10mins) ($10) you can see the demo here. http://neomafia.net -
Advance Race mod (Race run every 10mins) ($10)
benlakaz replied to benlakaz's topic in Paid Modifications
Re: Advance Race mod (Race run every 10mins) ($10) There will be a couple of things that you should update in your database.. There are 4 files and 1 cron files.. As of now it is running in my game its v2.. -
Hello to All, id like to offer this mod which allow users to participate in a race if they have a CAR item.. The maximum player in a race track is 10.. and the race runs every 10 mins.. The winner will be credited $100,000 and to enter a race he must have a car and must pay $30,000. If race participants is less than minimum the race will not start. Just PM me if you are interested. The price is $10.. Thanks
-
Re: Passport Mod (just a simple mod) Just a few edit on this line $q2=mysql_query("SELECT * FROM inventory WHERE inv_itemid='800'",$c); this has a problem because if only 1 user has passport all users can travel without needing a passport so.. replace it with $q2=mysql_query("SELECT * FROM inventory WHERE inv_itemid='800' AND inv_userid=$userid",$c);