Jump to content
MakeWebGames

Canjucks

Members
  • Posts

    419
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by Canjucks

  1. 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
  2. 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
  3. Re: [mccodes V2] Merits Mod [$10] What is your details for payment? (re: i pmd you question)
  4. 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
  5. Re: Crystal market with limit and day function ey thanks for that alabama will give that a go :)
  6. 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.
  7. 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?
  8. 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.
  9. 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
  10. Re: [mccode v2] Simple Login,Register,etc. (Validated.....) that is a kickass design ++1 for you shaved very impressive
  11. 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.
  12. 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.
  13. 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
  14. 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.
  15. 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.
  16. 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)
  17. 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.
  18. 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.
  19. 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?
  20. 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
  21. 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
  22. 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:
  23. Re: Gym Help Please if someone can help me get this the way I want I will offer a cash reward for doing so.....if anyone is interested in making some quick cash (in terms of it only being a couple of lines of code and not the whole mod) then please pm me your interest.
  24. Re: Sql Help thank you for the help. What I ended up doing was making a new field and making this a primary key with auto increments. And then in the first query instead of sorting by court ID i sorted by court KEY (primary key) and this seems to have worked.   But will give your suggestion a go Alabama just because you took the time to try and help me out :)
  25. Re: Sql Help I do appreciate your help but this is the error i get: Fatal error: Call to undefined method database::fetch_array() on line 15 any ideas?
×
×
  • Create New...