Jump to content
MakeWebGames

orsino

Members
  • Posts

    167
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by orsino

  1. 1 point of criticism keep the updates easy to do what i mean is so we do not need to download the whole game everytime and replace all the modules folder
  2. And again AlizHarb brings us a nice update for this wonderful engine 🙂
  3. this looks good ad modules and i am interested take a look here aswell maybe you will find some ideas https://github.com/rykas-productions/chivalry-engine/tree/chivalry-is-dead-game
  4. <?php $macropage = ('criminal.php'); require('globals.php'); include('class/class_evalmath.php'); $m = new EvalMath; echo "<h3><i class='game-icon game-icon-robber'></i> Criminal Center</h3>"; if ($api->UserStatus($ir['userid'], 'infirmary') || $api->UserStatus($ir['userid'], 'dungeon')) { alert('danger', "Uh Oh!", "You cannot commit crimes while in the hospital or jail."); die($h->endpage()); } if ($api->UserInfoGet($userid, 'will', true) > 100) { alert('danger', "Uh Oh!", "You cannot commit crimes while your will is over 100%!"); die($h->endpage()); } if (!isset($_GET['action'])) { $_GET['action'] = ''; } switch ($_GET['action']) { case 'crime': crime(); break; default: home(); break; } function home() { global $db, $h, $ir, $m, $userid, $api; $crimes = array(); $q2 = $db->query("/*qc=on*/SELECT `crimeGROUP`, `crimeNAME`, `crimeBRAVE`, `crimeID`, `crimePERCFORM` FROM `crimes` ORDER BY `crimeBRAVE` ASC"); while ($r2 = $db->fetch_row($q2)) { $crimes[] = $r2; } $db->free_result($q2); $q = $db->query("/*qc=on*/SELECT `cgID`, `cgNAME` FROM `crimegroups` ORDER BY `cgORDER` ASC"); echo "<div class='card'> <div class='card-body'><div class='row'> <div class='col'> <h5>Crime</h5> </div> <div class='col'> <h5>Success Chance</h5> </div> </div> <hr />"; while ($r = $db->fetch_row($q)) { echo "<div class='row'> <div class='col'> <h3>{$r['cgNAME']} Crimes</h3> </div> </div> <hr />"; foreach ($crimes as $v) { if ($v['crimeGROUP'] == $r['cgID']) { //Fix from Kyle Massacre. Thanks! //https://github.com/KyleMassacre $ec = str_ireplace(array("LEVEL", "EXP", "WILL", "IQ"), array($ir['level'], $ir['xp'], $ir['will'], $ir['iq']), $v['crimePERCFORM']) . ";"; $tokens = token_get_all("<?php {$ec}"); $expr = ''; foreach($tokens as $token) { if(is_string($token)) { if(in_array($token, array('(', ')', '+', '-', '/', '*'), true)) $expr .= $token; continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER))) $expr .= $text; } $v['sucrate']=$m->evaluate($expr); try { $v['sucrate']=$m->evaluate($expr); } catch (\Error $e) { alert('danger',"Uh Oh!","There's an issue with this crime. Please contact the game administration.",true,'criminal.php'); die($h->endpage()); } $specialnumber=((getSkillLevel($userid,17)*20)/100); $v['sucrate']=$v['sucrate']+($v['sucrate']*$specialnumber); if (hasNecklaceEquipped($userid,284)) { $v['sucrate']=$v['sucrate']+($v['sucrate']*0.1); } if ($v['sucrate'] > 100) $v['sucrate']=100; $v['sucrate']=round($v['sucrate']); echo "<div class='row'> <div class='col'> <a href='?action=crime&c={$v['crimeID']}'>{$v['crimeNAME']}</a><br /> Needed Brave: {$v['crimeBRAVE']} </div> <div class='col'> <div class='progress' style='height: 1rem;'> <div class='progress-bar bg-primary' role='progressbar' aria-valuenow='{$v['sucrate']}' style='width:{$v['sucrate']}%' aria-valuemin='0' aria-valuemax='100'> <span> {$v['sucrate']}% </span> </div> </div> </div> </div> <hr />"; } } } echo "</div> </div>"; $db->free_result($q); $h->endpage(); } function crime() { global $db, $userid, $ir, $h, $api, $m; if (!isset($_GET['c'])) { $_GET['c'] = 0; } $_GET['c'] = abs($_GET['c']); if ($_GET['c'] <= 0) { alert('danger', "Invalid Crime!", "You have chosen to commit and invalid crime.", true, 'criminal.php'); } else { $q = $db->query("/*qc=on*/SELECT * FROM `crimes` WHERE `crimeID` = {$_GET['c']} LIMIT 1"); if ($db->num_rows($q) == 0) { alert('danger', "Invalid Crime!", "You are trying to commit a non-existent crime.", true, 'criminal.php'); die($h->endpage()); } $r = $db->fetch_row($q); $db->free_result($q); if ($ir['brave'] < $r['crimeBRAVE']) { alert('danger', "Uh Oh!", "You do not have enough Bravery to commit this crime. You only have {$ir['brave']} Brave.", true, 'criminal.php'); die($h->endpage()); } else { //Fix from Kyle Massacre. Thanks! //https://github.com/KyleMassacre $ec = str_ireplace(array("LEVEL", "EXP", "WILL", "IQ"), array($ir['level'], $ir['xp'], $ir['will'], $ir['iq']), $r['crimePERCFORM']) . ";"; $tokens = token_get_all("<?php {$ec}"); $expr = ''; foreach($tokens as $token) { if(is_string($token)) { if(in_array($token, array('(', ')', '+', '-', '/', '*'), true)) $expr .= $token; continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER))) $expr .= $text; } $sucrate=$m->evaluate($expr); try { $sucrate=$m->evaluate($expr); } catch (\Error $e) { alert('danger',"Uh Oh!","There's an issue with this crime. Please contact the game administration.",true,'criminal.php'); die($h->endpage()); } if (!$sucrate) { alert('danger',"Uh Oh!","There's an issue with this crime. Please contact the game administration.",true,'criminal.php'); die($h->endpage()); } $specialnumber=((getSkillLevel($userid,17)*20)/100); $sucrate=$sucrate+($sucrate*$specialnumber); if (hasNecklaceEquipped($userid,284)) $sucrate=$sucrate+($sucrate*0.1); $ir['brave'] -= $r['crimeBRAVE']; $api->UserInfoSet($userid, "brave", "-{$r['crimeBRAVE']}"); if (Random(1, 100) <= $sucrate) { if (!empty($r['crimePRICURMIN'])) { $prim_currency = Random($r['crimePRICURMIN'], $r['crimePRICURMAX']); $api->UserGiveCurrency($userid, 'primary', $prim_currency); crime_log($_GET['c'],true,'copper',$prim_currency); addToEconomyLog('Criminal Activities', 'copper', $prim_currency); } if (!empty($r['crimeSECCURMIN'])) { $sec_currency = Random($r['crimeSECCURMIN'], $r['crimeSECURMAX']); $api->UserGiveCurrency($userid, 'secondary', $sec_currency); crime_log($_GET['c'],true,'token',$sec_currency); addToEconomyLog('Criminal Activities', 'token', $sec_currency); } if (!empty($r['crimeITEMSUC'])) { item_add($userid, $r['crimeITEMSUC'], 1); crime_log($_GET['c'],true,'item',1); } if (empty($prim_currency)) { $prim_currency = 0; } if (empty($sec_currency)) { $sec_currency = 0; } if (empty($r['crimeITEMSUC'])) { $r['crimeITEMSUC'] = 0; } if ($_GET['c'] == 3) //// cartheft { $item = array(1,2,3,4,5); $api->UserGiveItem($userid, $item[mt_rand(0,4)], 1); $api->SystemLogsAdd($userid, 'crime', "Successfully stole {$item} ."); } $text = str_ireplace(array("{money}","{secondary}","{item}"), array(number_format($prim_currency),number_format($sec_currency),$api->SystemItemIDtoName($r['crimeITEMSUC'])), $r['crimeSTEXT']); $title = "Success!"; $type = 'success'; $api->UserInfoSetStatic($userid, "xp", $ir['xp'] + $r['crimeXP']); $api->SystemLogsAdd($userid, 'crime', "Successfully committed the {$r['crimeNAME']} crime."); } else { $title = "Uh Oh!"; $type = 'danger'; $dtime = Random($r['crimeDUNGMIN'], $r['crimeDUNGMAX']); $text = str_replace("{time}", number_format($dtime), $r['crimeFTEXT']); $api->UserStatusSet($userid, 'dungeon', $dtime, $r['crimeDUNGREAS']); $api->SystemLogsAdd($userid, 'crime', "Failed to commit the {$r['crimeNAME']} crime."); crime_log($_GET['c'],false,0,0); } $api->SystemLogsAdd($userid, 'xp_gain', "+" . number_format($r['crimeXP']) . "XP"); alert("{$type}", "{$title}", "{$r['crimeITEXT']} {$text}", true, "?action=crime&c={$_GET['c']}", "Attempt Again"); die($h->endpage()); } } } function crime_log($crimeid,$won,$wontype,$wonqty) { global $db,$userid,$api; $q=$db->query("/*qc=on*/SELECT * FROM `crime_logs` WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); if ($db->num_rows($q) == 0) { $db->query("INSERT INTO `crime_logs` (`userid`, `crimeid`, `crimetotal`, `crimesuccess`, `crimecopper`, `crimetoken`, `crimeitem`) VALUES ('{$userid}', '{$crimeid}', '0', '0', '0', '0', '0')"); } $db->free_result($q); $q=$db->query("/*qc=on*/SELECT * FROM `crime_logs` WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); $r=$db->fetch_row($q); $db->query("UPDATE `crime_logs` SET `crimetotal` = `crimetotal` + 1 WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); if ($won) { if ($wontype == 'copper') { $db->query("UPDATE `crime_logs` SET `crimecopper` = `crimecopper` + {$wonqty} WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); } if ($wontype == 'token') { $db->query("UPDATE `crime_logs` SET `crimetoken` = `crimetoken` + {$wonqty} WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); } if ($wontype == 'item') { $db->query("UPDATE `crime_logs` SET `crimeitem` = `crimeitem` + 1 WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); } $db->query("UPDATE `crime_logs` SET `crimesuccess` = `crimesuccess` + 1 WHERE `userid` = {$userid} AND `crimeid` = {$crimeid}"); } } the item is given thats not the problem
  5. hello all im working on my crime page chivalryisdeadgame source (mccodes) i would like to ad crimes where the user steals a random item i already managed to do that but its not printing the item name when the crime is done if ($_GET['c'] == 3) //// cartheft { $item = array(1,2,3,4,5); $api->UserGiveItem($userid, $item[mt_rand(0,4)], 1); $api->SystemLogsAdd($userid, 'crime', "Successfully stole {$item} ."); } $text = str_ireplace(array("{money}","{secondary}","{item}"), array(number_format($prim_currency),number_format($sec_currency),$api->SystemItemIDtoName($r['crimeITEMSUC'])), $r['crimeSTEXT']); $title = "Success!"; $type = 'success'; when i have a normal crime with 1 item , i can add {items} in the text but i need it to work for random items aswell
  6. if i would sell it than lastdon.net goes offline and all of the modules will go to the other member
  7. hi if i get a good offer i would sell my gangster legends v2 with about 90 procent of the modules available i payed 500 for everything you can see it on lastdon.net
  8. orsino

    Last Don

    ok thx for the notice i need to change that
  9. orsino

    Last Don

    Hi there i created a new game build with glv2 premium and alot of mods from the marketplace here special thx to phpkiller to help me on the layout . i would like to know what you all think about the game so i can continue on development . and please don't forget to vote for my website 😉 Last Don
  10. took me less than a minute to find this
  11. i advice you to take a good look to all the modules available its all there already
  12. orsino

    Hey

    well guys i have the same problem if i use the normal jail module or a 3party module it stays the same i go to jail but the info say NaNaNaN
  13. *icon or badge * beter % in crime and theft *lower cost in travel * some pages that are only for premium members like smuggle is only for a premium member
  14. i am willing to pay for them if the price is good
  15. Premium membership don't do anything atm ??
  16. I always think like this. If you have a theme for a game you need to know stuff about that theme. Example if you make a mafia game you need to know some things about them, how they work. Otherwise it's doomed. As for a ninja game. Well there are not many games with that theme.
  17. Gangster legends has lots of modules and a good support. You need to think about what type of game you will start Gangster legends is different And needs a lot of work/money to change it into a mccodes type of game.
  18. deactivate the module and activate a new one or check the detective files for schema.sql and load it in your database
  19. Looks good
  20. Thx sim You are doing a great job here
  21. hi i'm looking for a new attack system or an update version on the one that is in the marketplace i want the attack system to be more like the one on mccodes so if you attack a player he will be hopitalised for x amount of time and it will cost some energy i will pay for this mod and the coder can post it on the marketplace giving him even more revenue
  22. i'm waiting for the release if its good i will buy this
  23. orsino

    MobstersWorld

    Made a new game with the Ganster legend premium www.mobstersWorld.com MobstersWorld , a mafia themed browser game set in 1930 . Rank your way up to be the next godfather/first lady Join a Family or make your own Smuggle in tabacco or Booze More than 30 different cars to steal
  24. hi i'm looking for a new theft where car images can be added so players see the image of the car they stole willing to pay
  25. thank you
×
×
  • Create New...