Jump to content
MakeWebGames

rulerofzu

Members
  • Posts

    2,464
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by rulerofzu

  1. You use a custom variable as detailed in their API instructions.
  2. Ah ok....as you mentioned you have been working with PHP for quite a few yrs then didnt think to give precise instructions ;) line 5 through to 51 needs to be removed and then follow the rest of the instructions.
  3. rulerofzu

    deleted

    You mean community support :whistling:
  4. Sorry but the php code function for this forum sucks ass!! [mysql]CREATE TABLE IF NOT EXISTS `Real_Estate` ( `R_id` mediumint(6) NOT NULL, `R_level` mediumint(6) NOT NULL, `R_houses` mediumint(6) NOT NULL, `R_hotels` mediumint(6) NOT NULL, `R_income` mediumint(6) NOT NULL, `R_tax` mediumint(6) NOT NULL, `R_upgrade` mediumint(6) NOT NULL, PRIMARY KEY (`R_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; [/mysql]
  5. <?php include('globals.php'); $is1=$db->query("SELECT R_id, R_level, R_houses, R_hotels, R_income, R_tax, R_upgrade FROM Real_Estate WHERE R_id=$userid"); $ir1=$db->fetch_row($is1); function realestate_index() { global $ir,$db,$userid,$ir1,$is1; if($db->num_rows($is1)==0){ echo"<center><h2>Real Estate</h2> You have not delved into the business of Real Estate yet. It is very easy to do. Just click the button below. <form action='real_estate.php?do=register_con' method='post'> <input type='hidden' name='id' value='{$userid}' /> <input type='submit' value='Start Real Estate Now!' /> </form></center>"; } else { $tax = ($ir1['R_tax'] / $ir1['R_level']) - ($ir['level'] / 2 ); $netincome = $ir1['R_income'] - $tax; echo"<center><h2>Real Estate</h2> Welcome back {$ir['username']}! Your Real Estate Stats are below. <table><tr><td>Level: {$ir1['R_level']}</td><td>Houses: {$ir1['R_houses']}</td><td>Hotel: {$ir1['R_hotels']}</td></tr> <tr><td>Income: {$ir1['R_income']}</td><td>Tax: {$tax}</td><td>Net Income: {$netincome}</td></tr></table> [b]<u>Buy Properties</u>[/b] [url='real_estate.php?do=buy_hcon']Buy House[/url] [url='real_estate.php?do=buy_hocon']Buy Hotel[/url] [b]<u>Upgrade Business</u>[/b] [url='real_estate.php?do=upgrade_con']Upgrade Business[/url] </center>"; } } function rcon() { global $ir,$db,$userid,$ir1; $_POST['id']=abs((int) $_POST['id']); $db->query("INSERT INTO Real_Estate (R_id, R_level, R_houses, R_hotels, R_income, R_tax, R_upgrade) VALUES ('{$_POST['id']}', 1, 0, 0, 0, 0, 10000)"); echo "<center>You have successfully entered the business of Real Estate go [url='real_estate.php']Back[/url] and start building up your income!</center>"; } function bhcon() { echo "<center>Are you sure you want to buy a house? It costs 1000 gold to buy one. It then adds 100 gold to your income. Tax is 5%. [url='real_estate.php?do=buy_hsub']Yes I'm Sure.[/url] [url='real_estate.php']Sorry I'm Not[/url] </center>"; } function bhsub() { global $ir,$db,$userid,$ir1; $db->query("UPDATE Real_Estate SET R_houses=R_houses+1, R_income=R_income+100, R_tax=R_tax+5, R_upgrade=R_upgrade+70 WHERE R_id=$userid"); $db->query("UPDATE users SET money = money - 1000 WHERE userid=$userid"); echo "You have successfully bought One House. Your Income is: {$ir1['R_income']}"; } function bhocon() { global $ir,$db,$userid,$ir1; echo "<center>Are you sure you want to buy a hotel? It costs 10000 gold to buy one. It then adds 1000 gold to your income. Tax is 10%. [url='real_estate.php?do=buy_hosub']Yes I'm Sure.[/url] [url='real_estate.php']Sorry I'm Not[/url] </center>"; } function bhosub() { global $ir,$db,$userid,$ir1; $db->query("UPDATE Real_Estate SET R_hotels = R_hotels + 1, R_income = R_income + 1000, R_tax = R_tax + 100 && R_upgrade = R_upgrade + 700 WHERE R_id=$userid"); $db->query("UPDATE users SET money = money - 10000 WHERE userid=$userid"); echo "You have successfully bought One Hotel. Your Income is: {$ir1['R_income']}"; } function upgcon() { echo "<center> Are you sure you want to upgrade your Real Estate business. This helps to lower your tax. It costs {$ir1['R_upgrade']} to do so. [url='real_estate.php?do=upgrade_sub']Yes I'm Sure.[/url] [url='real_estate.php']Sorry I'm Not[/url] </center>"; } function upgsub() { global $ir,$db,$userid,$ir1; $db->query("UPDATE users SET money = money - '{$ir1['R_upgrade']}' WHERE userid = $userid"); $db->query("UPDATE Real_Estate SET R_level = R_level + 1 WHERE R_id = $userid"); echo "You have successfully upgraded your Real_Estate business.!"; } switch($_REQUEST['do']) { case 'register_con': rcon(); break; case 'buy_hcon': bhcon(); break; case 'buy_hsub': bhsub(); break; case 'buy_hocon': bhocon(); break; case 'buy_hosub': bhosub(); break; case 'upgrade_con': upgcon(); break; case 'upgrade_sub': upgsub(); break; default: realestate_index(); break; } ?>   Fixed this up. Note this is not the way I would have coded this but I have no desire to recode it. Errors fixed for the OP fetch_array should be fetch_row No need for addition to users table - just check if there is a row using db->num_rows missing do= for upgrading and buying various spelling mistakes errors. mysql table uses mediumint rather than int which makes for less overhead in the database. I tested it briefly. Was able to sign up....buy upgrades, upgrade business which is everything its meant to do.
  6. rulerofzu

    deleted

    Last time I looked EZ had a growing number of modification. Enough for a basic game. Anyhow....everyone should be creating new ideas rather than taking mods from 2008 :D
  7. The bbcode there is subject to abuse so replacing it rather than trying to fix it is a better option. Delete the entire bbcode bit   google nbbc bb code and download. Read how to which is very simple.   include('nbbc.php')     $bbcode = new BBCode;   look for where you have $bbc->bbcode_parse   and then replace $bbc->bbcode_parse with $bbcode->parse
  8. rulerofzu

    deleted

    Neither. Both require a large amount of your time and work to get it to a functional secure state or $150+ to get someone to secure it for you as the owners are not willing to support their own products. There are other engines out there which do not. Zap and ezrpg for example.
  9. Try changing the text you cannot refresh or go back on the slots   For a start. $horse[1]=(int) rand(1,125);if ($horse[1] > 0 && $horse[1] < 50)   $slot[1]=(int) rand(0,9);   Did i really need to back up my points. No not really. Just say you edited the slotsmachine.php and here it is I dont see the problem in being honest.
  10. Is it really your own mod when you just take whats already been done and just change the names?
  11. fixed it up for you see below
  12. Why all the seperate queries?? For example in the bhsub function Your have two queries to the real estate table when it could be just one. Your just making more queries and more overhead.
  13. What they always want..... shit for free!
  14. @ Danny high players are a mixture of those that spend and those that dont due to the other incentives that are available.
  15. On rulerofzu.com I use a custom donator system which acts like a shopping cart and supports bogo's and purchasing for other players. What can be purchased varies. Packs can be just days, money, crystals and/or items. I use paypal and 2checkout as the processors. As for micro mobile payments I find them to be more hassle than its worth. Ive used two and removed them as they often take too much and also have been known to change their system as they have clauses where if a transaction fails you do not get the funds and they keep it. One system I used kept changing their internal system so that transactions would fail. Not funny. Prices and transaction amounts I am not going to go into. Each game should be ran to what you believe its worth not what others think, charge on their game and believe is the right amount. If done correctly then your game will be a success. Currency is dollars due the expected player market base judged as USA. However my EU/UK players enjoy a good exchange rate!
  16. Its a demo for the mccodes engine isnt it?
  17. Its not harsh its a wake up call. Taking into account he will code mods for money as stated in one of his other posts when clearly he cannot code.
  18. Learn how to code would be a good starting point for you.
  19. Sorry but your mod fails and ill point out why it failed on many levels. You didnt write it. Instead your taking code from other mods, other posts and examples placing it altogether and saying hey look at my mod. Hence why it fails. You have very little concept of php code and what should be used and where.
  20. Nope its not fixed. Clearly you just read Dom's reply and didnt read what you was supposed to do. event add does not and will not work. Go read the code for the function and then try it again. you will also need to call the db class for your queries to work. For someone that has been on here for a few months you still have learned very little.
  21. Is this the mod you was attempting to sell for $15? Sorry but this is just a stripped down version of the free one you can find by using the search. Not a very good stripped down version either.
  22. This has been done several times.....use the search function.
  23. No where laston?? If your gonna do it then credit those actually playing!
  24. This thread Off topic much? :whistling:
×
×
  • Create New...