
virtualshogun
Members-
Posts
21 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by virtualshogun
-
one other approach to this is meta refresh or did i miss this totally its 6:00 Am and im running on little sleep lol but here item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully. <meta http-equiv='Refresh' content='1;url=inventory.php'>"; so after they equip they will see item x equipped successfully then a moment later it kicks you back to the inventory, and it works with i.e or f.f with no-script on :D
-
<?php include "globals.php"; //------------------------------------------------------------------------// // - Mad Bomber Mod free - by virtualshogun // //----------------------------------------------------------------------// if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } print "<h1>The Bomb Stop</h1>"; print "<hr />"; print " <font color=red>Red Wire</font> <font color=blue>Blue Wire</font> <font color=green>Green Wire</font> "; print "<hr />"; if($_GET['c'] == 1) { $chance = rand(1,3); if ($chance == 1) { $hospital=(int) rand(1,10); $loseruser = $ir['userid']; $hospreason = 'Its the bomb!'; $db->query("UPDATE users SET hospital=10 WHERE userid=$userid",$c); $db->query("UPDATE users SET hospreason='$hospreason' WHERE userid=$userid",$c); die ("you snip the first wire and well this dosent end well... "); } if ($chance == 2) { $jail=(int) rand(5,10); $loseruser = $ir['userid']; $jail_reason = 'Suspected Bomber!'; $db->query("UPDATE users SET jail=1 WHERE userid=$userid",$c); $db->query("UPDATE users SET jail_reason='$jail_reason' WHERE userid=$userid",$c); die ("!You go to disarm the bomb and get a tap on the shoulder the police think you set the bomb! "); } if ($chance == 3) { $gained=rand(20,90)*$ir[level]; print "<font color=green>You cut the right wire and get rewarded with $$gained dollars </font>"; $db->query("update users set money=money+$gained where userid=$userid",$c); } } if($_GET['c'] == 2) { $chance = rand(1,3); if ($chance == 1) { $hospital=(int) rand(1,10); $loseruser = $ir['userid']; $hospreason = 'Blown up not blow up doll!'; $db->query("UPDATE users SET hospital=10 WHERE userid=$userid",$c); $db->query("UPDATE users SET hospreason='$hospreason' WHERE userid=$userid",$c); die ("you snip the second wire and you now know what it feels like to have blue eyes on this way one that way... "); } if ($chance == 2) { $jail=(int) rand(5,10); $loseruser = $ir['userid']; $jail_reason = 'Mad bomber!'; $db->query("UPDATE users SET jail=1 WHERE userid=$userid",$c); $db->query("UPDATE users SET jail_reason='$jail_reason' WHERE userid=$userid",$c); die ("!You go to disarm the bomb and get a tap on the shoulder the police think you set the bomb! "); } if ($chance == 3) { $gained=rand(20,90)*$ir[level]; print "<font color=green>You cut the right wire and get rewarded with $$gained dollars </font>"; $db->query("update users set money=money+$gained where userid=$userid",$c); } } if($_GET['c'] == 3) { $chance = rand(1,3); if ($chance == 1) { $hospital=(int) rand(1,10); $loseruser = $ir['userid']; $hospreason = 'Blown up not blow up doll!'; $db->query("UPDATE users SET hospital=10 WHERE userid=$userid",$c); $db->query("UPDATE users SET hospreason='$hospreason' WHERE userid=$userid",$c); die ("you snip the second wire and you now know what it feels like to have blue eyes on this way one that way... "); } if ($chance == 2) { $jail=(int) rand(5,10); $loseruser = $ir['userid']; $jail_reason = 'Mad bomber!'; $db->query("UPDATE users SET jail=1 WHERE userid=$userid",$c); $db->query("UPDATE users SET jail_reason='$jail_reason' WHERE userid=$userid",$c); die ("!You go to disarm the bomb and get a tap on the shoulder the police think you set the bomb! "); } if ($chance == 3) { $gained=rand(20,90)*$ir[level]; //Adjust the money above ;) print "<font color=green>You cut the right wire and get rewarded with $$gained dollars </font>"; $db->query("update users set money=money+$gained where userid=$userid",$c); } } EOF; $h->endpage(); ?>
-
something else you can do as well is change the color and perhapse add a icon / png whatever you like that shows visually that you have a event or even mail or an announcement has been added Mainmenu.php -> if($mc > 0) { print " <table border='1' bgcolor='#F5F6CE'> <tr> <td style='background-image: url(smoke.jpg)'><td width ='140'><font color=red>Mailbox ($mc) </td> </tr> </table>"; } else { print " <table border='1'> <tr> <td style='background-image: url(smoke.jpg)'><td width ='140'><font color=red>Mailbox (0)   </td> </tr> </table>"; }
-
also look into item dupeing as well, i know awhile back when i had a button in the inventory instead of doing it automatically one person was dupeing things thats not really that hard to do, make a stack of 10 items then have 1's below it 1 item 1 item 1 item 10 of that item sell the first one in the for the total price because the code thinks you have all the items up for sale and counts it as 13 when all you really sell is one item, if you dont have a item quantifier or something that automatically dose this for you then i have this inventory.php (open and find) <?php require_once "globals.php"; then under add : $used=array(); $q=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid"); while ( $r=mysql_fetch_array($q) ) { if ( ! in_array ( $r['inv_id'], $used ) ) { $currdel=array(); $used[] =$r['inv_id']; $currdel[]=$r['inv_id']; $amount=$r['inv_qty']; //grab sellers others $q2=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid = {$r['inv_itemid']} AND inv_id != {$r['inv_id']}"); while ( $r2 = mysql_fetch_array($q2) ) { $used[]=$r2['inv_id']; $currdel[]=$r2['inv_id']; $amount+=$r2['inv_qty']; } $db->query("DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).")"); $db->query("INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount)"); } } simple easy auto quantifier in moments and they dont have to be honest, it wont let them dupe items but theres also the sell items input field that you can use to cheat as well check that, and should be right as rain hope this helps,
-
some help with global functions V2
virtualshogun replied to virtualshogun's topic in General Discussion
did that the only thing that seems to work is $ir['exp_needed'] = (int) (($ir['level']+1)*$ir['level']+1)*($ir['level']+1)*6.6 /10); i reset the exp to 0 and the level back to 700 and this is working odd enough im thinking that it changed the large number that the code wouldnt accept into something it would, thoughts comments, but its allowing past the 700 mark and its gaining exp like normal i just cant explain it, -
some help with global functions V2
virtualshogun replied to virtualshogun's topic in General Discussion
i know its been set to bigint in the cpanel but code wise how do i fix that ? (bigint) ? something like $ir['exp_needed'] = (bigint) (($ir['level']+1)*$ir['level']+1)*($ir['level']+1)*6.6); -
some help with global functions V2
virtualshogun replied to virtualshogun's topic in General Discussion
intresting effect now every page refresh i go up a level and the exp is all kinds of bounceing, it goes positive and then negative then positive :cursing: -
alright when a user hits level 700 they are shot to level 9500 this is the level check function straight out of the global functions any help would be greatly apprectiated, thanks, function check_level() { global $ir,$c,$userid; if($ir['level'] < 10000) { $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*6.6); while ($ir['exp'] >= $ir['exp_needed'] and $ir['level'] < 9500) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*6.6); mysql_query("UPDATE users SET level=level+1,exp=$expu,energy=energy+2,brave=brave+2,maxenergy=maxenergy+2,maxbrave=maxbrave+2, hp=hp+50,maxhp=maxhp+50 where userid=$userid",$c); } } } ive been at this for several hours and well its giveing me a headache :P
-
<?php session_start(); include "mysql.php"; $c; if(!$_GET['code'] || !$_GET['act']) { die("Invalid Use Of System."); } else { $code=$_GET['code']; $cq=mysql_query("select * from confirm where code=$code",$c); if(mysql_num_rows($cq) != 1) { die("Invalid Validation Code"); } $r=mysql_fetch_array($cq); if($_GET['act'] == 'activate') { mysql_query("UPDATE users SET confirmed='1' WHERE userid={$r[user]}",$c); mysql_query("DELETE FROM confirm WHERE code=$code",$c); print "Account Validated! Login"; } else if($_GET[act] == 'cancel') { mysql_query("DELETE FROM users WHERE userid={$r[user]}",$c); mysql_query("DELETE FROM confirm WHERE code=$code",$c); print "Your account has successfully been cancelled, Were sorry you had to leave.";exit; } else { die("Invalid Action."); } } ?> try != 1 if i follow this right you wanting to ensure $cq isnt empty if not 1 then throw a error, != 1 i may be wrong need to get some coffee :D
-
dont know how effective it would be but you could move the first inital page instead of going straight to the staff pannel have them goto a verify page that requires a password and username to get into the real staff pannel, with a few things in mind, when they are not in the staff pannel or on one of the pages lock it back up forceing them to login each time, i know its more work for the staff but better protected i would think, goto your mainmenu.php change the link to the verify page heck if you could hide the actual staff pannel address under a encoded link name that would be cool so it cannot be just typed in yourgame/staff.php or whatever but also set it to where you do manage to go to the staff pannel passing the verifiy page dont let them in without the information being passed to the staff pannel password whatever, <a href='verifyme.php>Staff Pannel</a> you could put in passwords for each level, or not and dont just trust that staff would logout when done, locking it back up.. so every say 15 minuets (name your own time) they would have to re-verify they are indeed staff and supposed to be allowed into the staff pannel, or get booted, sorta like the image verification for people, staff verify then explain to your staff it would be really stupid to give that password out to people, im working on a verify page ill have it up shortly as a free thing mod it secure it more whatever, anything that helps others out.
-
move your staff pannel all togather i know its alot of work but couldnt hurt heck have a bit of fun with them, make staff.php then add #first line tells you who event_add(1,"{$ir['username']} Has just attempted to enter your staff pannel think you might want to do something about it ?",$c); #Fedjail them for 1 million days $db->query("UPDATE fedjail SET fed_days=fed_days+1000000 WHERE userid=$userid",$c); #kick them to fbi.gov for the annoyance value print"<meta http-equiv='Refresh' content='1;url=www.fbi.gov'>"; no warning to them its happening they enter the page they are gone let them try and tell you they didnt later,
-
is that wamp or is that online if its a wamp. under: > <?php Add: > error_reporting (0 ); --------------------------- <?php error_reporting (0 ); hope that helps, looked like wamp.
-
print " <style type='text/css'> <!-- body {background-image:url('2.jpg')} background-repeat:no-repeat; //--> </style> </script>"; use the repeat / no repeat to choose weither or not is shows more then once if you have a pic too small for the page it will try to repeat,
-
just a little clairification on something <img src= 'toys/".$r['itmid'].".jpg' border='0' width = '50' height = '50'> thats a folder in your root named toys (items) it goes 1.jpg , 2.jpg , 3.jpg and so on its useing the item number then .jpg extension just so people dont use this or mine and go where did my pics go if you have it somewhere else, nice addon danny
-
Re: Locked Account Mod [V2] then you have an account locker, why not use a cookie something ive been thinking about / working on is a passkey file that you gotta have on your pc to access certain things, like admin account, example call the file Pass.txt it would be on your local drive C:\Pass.txt when logining in it looks for that file, so even if the admin account gets hacked if they dont have Pass.txt in the C:\ directory then they litterly cannot get into the staff pannel eliminateing the hacker getting in and totally changeing things, like giveing the users millions of (insert item / cash here ?) my thoughts.
-
basic idea with this mod you add one value to your users table called locked and if the player dose something that breaks the rules they cant do anything but login and logout... it wont let them access links.. ----------in Mainmenu.php add------------ if($ir['locked'] > 0) { print " <td align=center></td> "; die('<table border = "1" > <td><font color =red>!! Your Account Has Been Locked There Is No Way Around This!! </font>                                             [ Logout ]</td>'); } then add a field to users called "locked" `locked` int(11) NOT NULL DEFAULT '0', then add a button in viewusers.php in the staff section with mysql_query("UPDATE users SET locked = 1 WHERE userid=$userid",$c); to unlock the account simply add a button to unlock it mysql_query("UPDATE users SET locked = 0 WHERE userid=$userid",$c);
-
Re: Finding items why not just modify explore.php right under <?php include "globals.php"; $tresder=(int) rand(100,999); add: $num=rand(1, 100); switch($num) { case 10: Print "you see someone getting beaten down better move on! "; break; case 40: $hospital=(int) rand(1,10); $loseruser = $ir['userid']; $hospreason = 'Beaten down in a back alley.'; $db->query("UPDATE users SET hospital=$hospital WHERE userid=$userid",$c); $db->query("UPDATE users SET hospreason='$hospreason' WHERE userid=$userid",$c); die ("!Random Event! turn down one street and get beat down! "); break; case 60: $gainer = rand(1,5); print "While looking around you find some cash and gained $gainer dollars!"; $db->query("update users set money=money+$gainer where userid=$userid",$c); break; } just a thought,
-
Re: Street Images eh true, different ways to skin the same cat im guessing and no your math isnt bad :D
-
Re: Street Images or put it into an array for even shorter $chance = rand(1,10); $Spic = array("streets1.jpg","streets2.jpg","streets3.jpg","streets4.jpg","streets5.jpg","streets6.jpg","streets7.jpg","streets8.jpg","streets9.jpg","streets10.jpg"); $Showpic = ($Spic, $chance); print "<img src=$Showpic 'width=500' 'height=300'> ";
-
Re: Street Images $chance = rand(1,10); if ($chance == 1) { $spinpicA = 'streets1.jpg'; //random event or thing or nothing... } if ($chance == 2) { $spinpicA = 'streets2.jpg'; } if ($chance == 3) { $spinpicA = 'streets3.jpg'; } if ($chance == 4) { $spinpicA = 'streets4.jpg'; } if ($chance == 5) { $spinpicA = 'streets5.jpg'; } if ($chance == 6) { $spinpicA = 'streets6.jpg'; } if ($chance == 7) { $spinpicA = 'streets7.jpg'; } if ($chance == 8) { $spinpicA = 'streets8.jpg'; } if ($chance == 9) { $spinpicA = 'streets9.jpg'; } if ($chance == 10) { $spinpicA = 'streets10.jpg'; } print "<img src=$spinpicA 'width=500' 'height=300'> "; there you go,