Jump to content
MakeWebGames

grimsybaby

Members
  • Posts

    67
  • Joined

  • Last visited

    Never

Everything posted by grimsybaby

  1. Re: [mccode] Crimes give random money   <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=$db->query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=$db->fetch_row($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print " [b]{$r['crimeITEXT']}[/b]"; $ir['brave']-=$r['crimeBRAVE']; $db->query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],"<font color='green'> [b]{$r['crimeSTEXT']}[/b] </font>"); $muny=(int) (rand($r['crimesMINMONEY'],$r['crimesMAXMONEY'])); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); $db->query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp=exp+{$r['crimeXP']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); $db->query("INSERT INTO `criminalrecord` (`crID`, `crCRIME`, `crUSER`, `crRESULT`) VALUES ('', '$_GET[c]', '$userid', '1');",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print "<font color='orange'> [b]{$r['crimeFTEXT']}[/b] </font>"; } else { print "<font color='red'> [b]{$r['crimeJTEXT']} {$r[crimeJAILTIME]} minutes.[/b] </font>"; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); $db->query("INSERT INTO `criminalrecord` (`crID`, `crCRIME`, `crUSER`, `crRESULT`) VALUES ('', '$_GET[c]', '$userid', '0');",$c); } } print " [url='docrime.php?c={$_GET[']Try Again[/url] [url='criminal.php']Crimes[/url]"; } } $h->endpage(); ?>   i added the line $muny=(int) (rand($r['crimesMINMONEY'],$r['crimesMAXMONEY'])); but now i dont get anymoney at all for doing crimes, i went through all of the install 3 times over. making sure i didnt have any mistakes as i did it real early this morning lol XD but nope i did it exactly how jamboy put it up :) and nope :(
  2. Re: [mccode] Crimes give random money hmm thats good news then :) i have added but, im not getting any money for the crimes :s
  3. Re: [mccode] Crimes give random money can this be used for version 2 ?
  4. Re: Inventry Help!   chears :) ill see if that works inabit :), im new to editing to revamp codes :) thought id see if people could find errors that i cant find :)
  5. Re: Inventry Help! anyone ? ? ?
  6. im trying to revamp my inventry.php to make it look nicer and easyer to use :) but i have come across an errer which akes no sense to me, can someone check it over see if they could fix it please ? it'll be free to use once its been fixed, :) it's ment to show the wweapon's and Armour when equiping them :)   <?php include "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width=75% border=0 align='center'> <tr> <td width=25%><div align='left'>Picture:</div></td> <td width=25% align='center' valign='middle'><div align='center'>"; if($id['itmpic']) { $itmpic = "[img={$id[]"; }";</div></td> <td width=25% align='center' valign='middle'><div align='center'>"; if($id['itmpic']) { $itmpic = "[img={$id[]"; }";</div></td> <td width=25% align='center' valign='middle'><div align='center'>"; if($id['itmpic']) { $itmpic = "[img={$id[]"; }";</div></td> </tr> <tr> <td><div align='left'>Item Name:</div></td> <td align='center' valign='middle'><div align='center'>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</div></td> <td align='center' valign='middle'><div align='center'>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</div></td> <td align='center' valign='middle'><div align='center'>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</div></td> </tr> <tr> <td><div align='left'>Where Abouts: </div></td> <td align='center' valign='middle'><div align='center'>[b]Primary Weapon [/b]</div></td> <td align='center' valign='middle'><div align='center'>[b]Secondary Weapon [/b]</div></td> <td align='center' valign='middle'><div align='center'>[b]Armour[/b]</div></td> </tr> <tr> <td><div align='left'>Uniquip:</div></td> <td align='center' valign='middle'><div align='center'>[url='unequip.php?type=equip_primary']Unequip Item[/url]</div></td> "; } else { print "None equipped. <td align='center' valign='middle'><div align='center'>[url='unequip.php?type=equip_secondary']Unequip Item[/url]</div></td> "; } else { print "None equipped. <td align='center' valign='middle'><div align='center'>[url='unequip.php?type=equip_armor']Unequip Item[/url]</div></td> "; } else { print "None equipped. </tr> </table> <hr /> <h3 align='center'>Inventory</h3> <hr /> <div align='center'>"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]You have no items![/b]"; } else { print "<div align='center'>[b]Your items are listed below.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\"><div align='center'>Item</div></td> <td class=\"h\"><div align='center'>Sell Value</div></td> <td class=\"h\"><div align='center'>Total Sell Value</div></td> <td class=\"h\"><div align='center'>Links</div></td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4 align='center' valign='middle'><div align='center'>[b]{$lt}[/b]</div></td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td align='center' valign='middle'><div align='center'> <div align='center'>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</div></td><td><div align='center'>\${$i['itmsellprice']}</div></td><td><div align='center'>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='iteminfo.php?ID={$i[']Info[/url]] [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } print " [[url='displayadd.php?ID=$userid&action=add&itm={$i[']Display[/url]]"; } print "</div></td></tr>"; } print " </table> </div> "; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat.[/size]"; print " [[url='display.php?ID=$userid']Display Cabinet[/url]]"; $h->endpage(); ?>   Parse error: syntax error, unexpected T_ELSE in /home/*username*/public_html/game/inventory.php on line 39 many thanks :) -Simon-
  7. Re: [mccode v2] New improved mailbox. mail isnt showing you have a new message on the main menu :s has anyone got a fix? im useing the most updated version posted :)
  8. Re: viewuser.php help   which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD   <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr>   Umm... yeah about that lol. Sorry about that, it snuck past me :P hehe no problem see thats why im stumped XD i cant find an error but it just doesnt show up :(
  9. Re: viewuser.php help   which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD   <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr>
  10. Re: viewuser.php help   which one do i need closeing i cant see it :s
  11. i redone my viewuser.php works fine apart from the player picture doesnt come up :s can anyone help?   <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); $m=$db->query("SELECT * FROM users WHERE userid={$r['married']}"); $par=$db->fetch_row($m); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Assistant"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['married'] != 0) { $partner= "[url='viewuser.php?u={$par[']<font color=green>{$par['username']}</font>[/url]"; } else { $partner= "<font color=red>N/A</font>"; } if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3 align='center'>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'> <tr> <th colspan=2 rowspan=2 align='left' valign='middle'><div align='left'>General Info</div> Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Level: {$r['level']} Gender: {$r['gender']} Married: $partner Property: {$r['hNAME']} Health: {$r['hp']}/{$r['maxhp']} Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Gang: "; if($r['gang']) { print "{$r['gangNAME']}"; } else { print "N/A"; } if($r['fedjail']) { print " Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']} </th> <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> <tr> <th width='70%' rowspan='2' align='left' valign='top'>[b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "[/b] </th> <th colspan='2' align='center' valign='middle'><div align='center'>Links</div></th> </tr> <tr> <td width='9%'> [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " </td> <td><div align='left'>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] "; if($set['sendcrys_on']) { print "[[url='sendcrys.php?ID={$r[']Send Crystals[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='attack.php?ID={$r[']Attack[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]] [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]] "; } print "</div> </tr> <tr> <td colspan='3' align='center' valign='middle'><div align='center'>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print " </div> <h3 align='center'>Internet Info</h3> <div align='center'> <table width='100%' border='0' cellspacing='1' class='table'> <tr> <td align='center' valign='middle'><div align='center'></div></td> <td align='center' valign='middle' class='h'><div align='center'>IP</div></td> <td align='center' valign='middle' class='h'><div align='center'>Hostname</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Last Hit</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastiph]</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Last Login</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_login]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_loginh]</div></td> </tr> <tr> <td align='center' valign='middle' class='h'><div align='center'>Signup</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_signup]</div></td> <td align='center' valign='middle'><div align='center'>$r[lastip_signuph]</div></td> </tr> </table> "; print" </div> <form action='staffnotes.php' method='post'> <div align='center'>Staff Notes: <textarea rows=7 cols=100 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input name='submit' type='submit' value='Change' /> </div> </form> <div align='center'>"; } else { print " "; } print " </div></td> </tr> </table>"; } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } if($r['profileSIG'] == "") { print " <table cellspacing=1 class='table' width='95%'> <tr style='background:gray'> <th>[b]<center>Profile Signature</center>[/b]</th> </tr> <tr> <td>[b]<center>This user has not got a profile signature!</center>[/b]</td> </tr> </table>"; } else { print " <table cellspacing=1 class='table' width='95%'> <tr style='background:gray'> <th>[b]<center>Profile Signature</center>[/b]</th> </tr> <tr> <td>{$r['profileSIG']}</td> </tr> </table>"; } $h->endpage(); ?>   -Simon-
  12. i was just wondering is their a mccodes report player image mod out their somewhere, as this would be handy to say delete a users image if it had explitic content you didnt like as a profile image.
  13. Re: [mccode v2] Profile Image Uploader is their a possibility that you dont have to have it on you public_html say if you are useing the public_html for your main domain and running your mccodes on a subdomain how would you change the code?
  14. Re: [mccode v2] Updated Personal Details i followed it perfectly im just getting this error     line 50 case 'pdetailchange': line 51 pdetail_change(); line 52 break;   i dont see where its a fatel error :s   Edit/ fixed :)
  15. Re: Energy problem lol so howd you manage to get if a non donator to 100 energy and a donator to 150 ? i cant find it anywhere lol :s
  16. Re: [mccode v2] Display Cabinet hmm im having a little problem putting it into the the query :s   how could i fix this ? so it works :)
×
×
  • Create New...