Jump to content
MakeWebGames

Canjucks

Members
  • Posts

    423
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by Canjucks

  1. the health bar is inaccurate as it pulls from two tables (rank and userstats). As I want to make that upgrade able i'm thinking I might just make a new field for userstats for maxhealth. I love your code there sim that is something I'm going to add in (you may have written it for me lol). I now need to work out (if someone knows please tell me) how to reduce time in hospital using an item or revive button that costs energy or money. With that I need to cut off pages from being accessible while in jail and hospital.
  2. just a noob, how do I add someone to hospital once health hits 0 and they need to spend x amount of time in hosp - found that one I think!
  3. Bare with me still new lol.... I'm wanting to update timers for character stats. I have changed the maximums and names. I'm working on new mod ideas and this timer for say Energy will come into that. At the moment it increase by 4 points / 100. What I want to find out is how to change that to say 5 and see what timer its on so I can change this if say a player pays for a subscription to 10. (I have loads of ideas but am going to build this differently from my past games where I just dumped a heap of things in and really it got a bit lost). I'll edit my post. What I want to do is put in a timer in the Energy/Will/Health character stats with the totals (done those). Increase the timer and create new ones. Add in conditional checks on pages if you're in hospital not just jail and create the hospital timer for different aspects of the game like Russian roulette for instance where you lose all your energy, will and health plus 30000 minutes in hospital (the only way out is either a medical item or wait it out). For the hospital does it need a seperate table in the db? with jail as users might be able to bust/bail and revive. For awards I need to add one to count so they can be recorded.
  4. thanks for that guys. I appreciate it. I'm a long time out of coding now trying to get my head around the code to customise this game the way I want it. Its so much better than what I worked with 10 years ago...congrats to the developer and making this open source. I can see how this can be expanded sooooo much
  5. Might just be me but I installed the free script and just wondering if Character Stats was included? Did I miss something in the setup? Thanks in advance
  6. Re: [mccodes V2] Merits Mod [$10] What is your details for payment? (re: i pmd you question)
  7. Re: [v1][mccodes] Gang Decline Message Decline Message should be Decline Message   otherwise we send out welcome message and replace that but +1 love it all the same
  8. Re: Crystal market with limit and day function ey thanks for that alabama will give that a go :)
  9. Re: Crystal market with limit and day function the mod is great don't get me wrong in any way. I just can't work out the cron to work correctly so probably more me than your code. I am not sure as the numbers haven't changed in the days left of the crystal market thats all.
  10. Re: Crystal market with limit and day function great mod +1 Had it running for a few days and tested the cron in cron hour like you say and even had a go at crond day but nothing happens? anyone else have that?
  11. Re: Help with items A BIG THANK YOU TO WAR HERO who was my hero and saved the day for me. Appreciate your help +1 for you War Hero :) If you would like to know the solution please pm me.
  12. Hi Guys, I have a nice little problem that I have been lost on finding a simple answer for. I have done the hard part in creating my own book shop that shows seperate to the other shops. Thats that part done and out the way. Now, next thing on my list before I can add it is this, Since it is a book store the items give out various stats. So, what I would like it to do is everytime someone reads a book (usese the item) I want it to add 1 to booksread. The booksread is just a bragging thing I spose to see how many books one can read and who is the biggest book worm. The question then becomes where do I put the code for adding 1 to booksread (which will be a column in the Users table). As in do I put a db query to add it in the item when its created (so what it does for being affected part) or do I need a db query for each item the book store refers to in Use this item? I have used this before with a free mod posted on CE with a local library (I think it was called) where I added the booksread in that file but I feel doing it this way it becomes a bit more complicated. Any help or hint in the right direction would be fantastic thank you
  13. Re: [mccode v2] Simple Login,Register,etc. (Validated.....) that is a kickass design ++1 for you shaved very impressive
  14. Re: [mccode v1] New Jobs nevermind i deleted jrPAY > {$ir['jrPAY']} AND and it worked go figure for something simple and tearing my hair out trying to find something so darn simple no wonder no one answered for something so trivial, would have been nice and still would have learnt from it all the same.
  15. Re: [mccode v1] New Jobs what am i missing here? i have gone through my codes, printed it out and compared to the old one that worked and cannot see where it is a problem as this query is the same as the one that works.
  16. Re: [mccode v1] New Jobs This is a nice mod only problem is that I have this query error haven't been able to work out a solution as yet. Any ideas? this is when I press the try get promoted 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 'AND jrSTRN <= 88248.2853 AND jrLABOURN <= 2185.0000 AND jrIQN <= 1335.000000 AND' at line 1 Query was SELECT * FROM jobranks WHERE jrPAY > AND jrSTRN <= 88248.2853 AND jrLABOURN <= 2185.0000 AND jrIQN <= 1335.000000 AND jrJOB = 2 ORDER BY jrPAY DESC LIMIT 1 The code I am using is the V2 posted by Magicallguy Cheers in advance
  17. Re: Help yeah i was meaning notepad thanks radio but i also dont have this issue using OPERA (the browser) which is even better for me that I dont have to use notepad or anything else. My code edit in cpanel doesnt have find/replace so OPERA is a good solution for me at the moment. I believe that you can change the script from having the &apos to ' and internet explorer wont crack it so much. I just dont know where to add or exactly what the line is. it goes something like this: str_replace ("&apos" "'"); stopped looking into it once i found that OPERA works fine.
  18. Re: Help Thanks alabama, until I get this sorted I will just edit my code as you suggest (the long way now) copy paste, replace with, edit code, copy paste, save, view.....lol) This post will probably be handy if someone else comes across this issue down the line. I think I may have updated IE and thats when the it hit the fan with all this and the fact I hadnt touched my code for several days to notice exactly when it all got misinterpreted.
  19. Re: Help alabama yes i do have that in my header. Do I need to delete this? looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <html> <head> It should be ok as its Shaved92bravada three column template, which I hadnt had any problems with maybe until now. (got my game up and running again by doing your suggestion alabama cheers for that, had tried that earlier but didnt work must have missed one as i stupidily did it manually....lol but main point is my game is back up and viewable and testing can continue)
  20. Re: Help only problem is that it reverts back to include ' I am hoping there is a line that will allow Internet Explorer to start understanding apostrophes and not replace them with &apos. The wierd thing about all this is that its only just happened for whatever reason. I have been making this game for 2 - 3 months now. getting ready to go live with it all and I get this snag of misinterpretation between browsers.
  21. Re: Help My game is stuffed now and I do not know what to do I keep getting this error with any minor change I make. I stopped editing after one page and tested to see if it happened to the next and just happened to be the header.....my bad....lol But not seeing funny side any more. Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/piratesn/public_html/header.php on line 15 I have been searching as far and wide as I can on this and not a great deal is helping does anyone have any wisdom on this? It is Internet Explorer playing up and being mean.
  22. Re: Help http://fishbowl.pastiche.org/2003/07/01 ... e_of_apos/ From another google search I found this link and explains whats happened. Does anyone have any ideas how to get this fixed up?
  23. Not sure where to post this but will just add this here. I am not sure how this happened but would love someone to help me understand why this is appeariing in my codes all of a sudden ' an example below: I have done some searching on here and google but doesn't seem to be harsh from what I have found. <?php <table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th>Name</th> <th>Level</th> <th>Time</th><th>Reason</th></tr>"; $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); while($r=$db->fetch_row($q)) { print "\n<tr><td>{$r['gangPREFIX']} <a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]</td><td> {$r['level']}</td><td>{$r['hospital']} minutes</td><td>{$r['hospreason']}</td></tr>";   Any ideas of whats gone on? Cheers in advance
  24. Re: [help V2] Edit Item   as in when you go to edit item it doesn't always pick up what picture goes with the item
  25. I have been working on the Edit Item (staff_items.php) and whats happening is that the item will Edit no problem but if a user has this item in there inventory, it will lose its value/details when edited. I have been testing this out with a test item to see if my code edits work or just make ithe problem worse...lol. What I can do however, is manually edit the item in the database and the item will still be valid in the users inventory. Can anyone help on this? My thinking is for this to update correctly there should be maybe a line directing it to the inventory. Or could be the itempics because that doesn't always show up. Here s the Edit Item Code as that is where my issue is print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='staff_items.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Item</h3> <form action='staff_items.php?action=edititemsub' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Weapon/Armour Level: <input type='text' name='level' value='{$itemi['level']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /><hr /> [b]Item Pics[/b] <input type='text' name='itmpic' value='{$itemi['itmpic']}' /><hr /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $weapon=abs((int) $_POST['weapon']); $level=abs((int) $_POST['level']); $armor=abs((int) $_POST['armor']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, '{$_POST['itmpics']}' ,'$level')"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); }   Cheers in advance :mrgreen:
×
×
  • Create New...