Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,657
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Uridium

  1. Re: Cool Menu Maker   Yep Quite true it will also make all Standard Menus visible all the time you would never know who was in hospital or jail or events or even if you have mail. I made a jpg version of this and found i had to make 5 images for the things that needed to show up work. example image 1 would have been HOME INVENTORY MAIL EVENTS image 2 YOUR IN JAIL INVENTORY MAIL EVENTS image 3 HOSPITAL INVENTORY MAIL EVENTS as you can see it would become cumbersome as you would also need when in hospital or jail to have it display that you have an event or mail or Both....
  2. Re: [mccode] Stalemate for attacks   if($_GET['nextstep'] > 50) denotes the times taken to attack in this case 50 would be 25 attack clicks on the attack button so if you wanted your members to click 50 times then alter the 50 to 100
  3. Re: New Host needed Urgently   I Took Radio_Actives advice a it was also suggested to me by a few other people and have set up and account with the hosting company. DRAGOON Thank you very much for your offer of free hosting and i appreciate it. but as i see it free hosting would have its draw backs one namely being that its not a binding contract and one that i would sooner have.. Bu i am very Greatful.. I AM WICKED I visited your site and you have some very good offers However i was unable to click on any purchase plans which kind of put me off...
  4. Re: New Host needed Urgently     Thanks Radio_Active :) I will check them out.. Im fed up of hosts saying they offer the world then when you part with your cash they either shut down or close down your account due to crons.
  5. Look im sorry this is in the wrong place but i couldnt find a suitable place to put. Im in great need of a Host that supports all cron types and wont suspend accounts dut to it.. Can anyone help...
  6. Re: [mccode v2] Add images when you attack Small update I noticed when Attacking that the wrong users health bar was depleating so heres the fix... find print "</table">; add below   print" <table ALIGN=RIGHT width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='block_01.jpg'><center>[b]{$odata['username']} Health[/b]</td></tr><tr> <td width='169' background='block_02.jpg' valign='top'><center><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10> [img=attpics/{$odata[] <tr> <td width='169' height='21' height='21' background='block_03.jpg'><center></td></tr><tr><td> </td></tr> <tr> <table ALIGN=LEFT width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='block_01.jpg'><center>[b]{$ir['username']} Health:[/b]</td></tr><tr> <td width='169' background='block_02.jpg' valign='top'><center><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10> [img=attpics/{$ir[]<tr> <td width='169' height='21' height='21' background='block_03.jpg'><center></td></tr><tr><td> </td></tr> <tr></table>"; }   Again if your using your Profile images and not the attck images then alter accordingly .
  7. Re: [mccode v2] Jail All in one change if($ir['energy'] < 10); to if($ir['energy'] < 10) basically just remove the ; also if its not need the mention of jailchat.php just add // before it
  8. Re: [mccode v2] Male & Female count also Males & Females that are Online Both Killah and Zeros scripts worked for this.. However I used Killahs as he was first to post :) Cheers guys :)
  9. This has already been done i just chose to clean it up a little this mod will stalemate when the attack rate hits 50 counts.. Sends a Event Notification to the person you was trying to attack and one for yourself for future reference... OPEN UP attack.php FIND print "This player is unconscious. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }   and underneath Add......   if($_GET['nextstep'] > 50) { print"<center><h1><font color='red'>STALEMATE!</h1> <h2>This fight is going knowhere you may as well go home!</h2> [url='index.php']> Back[/url]</center>"; $h->endpage(); event_add($odata['userid'],"[url='viewuser.php?u=$userid']{$youdata['username']}[/url] Tried to beat you but stalemated.",$c); event_add($youdata['userid']," You Tried to beat [url='viewuser.php?u=$userid']{$odata['username']}[/url] but stalemated.",$c); exit; }   Reason for Edit forgot to put file name to be edited...
  10. Re: [mccodes V.2]Energy Sweet Shop Not sure how you got bar23.php in yours as it isnt even mentioned on ISHZ script lol   <?php /*----------------------------------------------------- -- Energysweetshop V.2 -- A product of Lost-Warzone -- [url]http://www.lost-warzone.net[/url] -- energysweetshop.php -- Free Mod -- not to be sold and please keep this part -----------------------------------------------------*/ include "globals.php"; print "<h2>Energy Sweet Store</h2> [i]Walking in to the Energy Sweet Shop you decide whether or not to buy a Energy Sweet <table width="70% border=1> <th height=8%>Energy Sweet</th><th height=8%>Cost</th> <tr> <td>Energy Sweet Shop</td> <td>$10 [url='sweetshop.php?spend=1']Buy Energy Sweet[/url]</td> </tr> </table> $money_take=10;//Enter how much money you would want to be taken if ($_GET['spend'] == '1') { if ($ir['money'] < 10) { print "You don't have enough money to buy the energy sweet Best leave now "; } else { if ($ir ['money'] >10) { print "You Bought A energy sweet And You Feel Some of your will coming to you after you ate it [url='explore.php']Back to Explore[/url] "; $db->("UPDATE users SET money="$money_take", energy=energy+5 WHERE userid=$userid",$c); } } } $h=>endpage(); ?>
  11. Re: [mccodes V.2]Energy Sweet Shop Getting a decent text Editor is a good thing one that will highlight your script and reveal what may be errors..   Watch what happens when i post your bit of code here and then correct it notice the colour changes.. YOUR PART <? if ($_GET['spend'] == '1') { if ($ir['money'] < 10) { ?>   MY PART   <? if ($_GET['spend'] == '1') { if ($ir['money'] < 10) { ?>   Even posting on here can give you and idea if the Script is right or wrong...
  12. Re: [mccodes V.2]Energy Sweet Shop whats with all the Hash statements ? those being # include "globals.php"; much easier to include "globals.php"; Your just confusing things with so many Hash statements
  13. Re: Installation.php is the file missing.. look in your class/ folder for the fiile class_db_mysql.php
  14. Re: [mccode] Mcc Christmas Theme Yep my HOST did a runner so im afraid its no longer Available :(
  15. Re: [mccode v2] Add images when you attack Littlemouse the code has been Posted if your referring to my Image above thats something you wll have to accomlish yourself im just merely showing you what can be donew ith it.
  16. Re: [mccode v2] Add images when you attack Just to show what you can Achieve from adding the pics and a bit of sparkle..
  17. Re: [mccode v2] Add images when you attack Just a small update for those using the attpics mod seeing as NPC's cant upload thier own image and it was driving me mental to find a cure.. Decepti0n kindly posted the fix for it Upload a default.jpg to your attpics folder this will be used by the NPCS goto your PHPMYADMIN and run this SQL update users set attpics = 'default.jpg' where user_level = 0 And if your just nistalling this it would be wise also to give members a pic so upload a pic call it nomemb.jpg or what ever.. and run this SQL update users set attpics = 'default.jpg' where user_level = 1 You can do the same for Staff if they dont have an image to share.
  18. Re: MYSQL to give pics to User_level 0 how ???   Cheeers Deception your a life saver this has been driving me mental :)
  19. in a nutshell I want all my NPC's to have an image But i dont want to Manually Alter them 1 by 1 what would be the Correct SQL so that i can get all user-level 0's so that they have an image.. would it be something like UPDATE user_level=0 FROM users WHERE attpics='default.jpg' at the moment the deafult.jpg isnt in the table so how would i make it so all the NPC's end up with that image as deafult ?? Sorry for posting in here i did post in the correct Area but tehre are more people here to read this. Thanks to Decepti0n :)
  20. i want to set all my NPCS so they all have the same IMAGE picture i have the images in the USERS table but how do i make it so the NPCS get the same image without having to do it manually via the phpmyadmin. i was thinking something like UPDATE user_level=0 FROM users WHERE attpics='default.jpg' but that doesnt seem to work at the moment all the NPCS images for the attpics table is empty.
  21. Re: [mccode v2] Add images when you attack if you would prefer to use the display_pic rather than the attpics then use the script below for the attack.php you will need the display pic uploader already installed for this to work however,,,   print "<table width='50%' align='center'><tr><td align=right> {$odata['username']} Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10> [img=displaypic/{$odata[]<tr><td align=right> {$ir['username']} Health: </tr></td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10> [img={$ir[]</td></tr></table>"; }
  22. This mod will allow you to upload an image for the sole use that it will be displayed when someone clicks on Attack. You will see your Image + that of your Opponents very small has no real purpose but it brings fun to the game. call this file attackimageuploader.php <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 © Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ require("globals.php"); if(empty($_FILES['imagefile'])) { echo ' Upload an Attack Image: <form name="imageuploader" method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data"> [i]Path of Image:[/i] <input type="file" name="imagefile" /> <input type="submit" name="Submit" value="Upload Image" /> </form> (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize = 1000000; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } /*What extensions can be used?*/ $valid = array('image/gif', 'image/png', 'image/pjpeg','image/jpeg', 'image/jpg'); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/pjpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (!$create) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path = 'attpics/'; $pic = $_FILES['imagefile']['name']; $picture = $path.$pic; $oldpic = $ir['attpics']; /*Check to see if its already uploaded*/ if ($picture == $oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $delete = @unlink($oldpic); if ($delete) { echo 'Previous image deleted from system... '; } if (!$delete) { echo 'No Previous image to be deleted... '; } $dataa = $_FILES['imagefile']['size']; $datab = $_FILES['imagefile']['type']; $datad = $_FILES['imagefile']['name']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded <u>Info:</u> Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check = mysql_query( sprintf("SELECT COUNT(*) as cnt FROM `users` WHERE `attpics` = '%s'", mysql_real_escape_string($picture))); $checks = mysql_fetch_array($check); if ($checks['cnt'] > 0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ mysql_query( sprintf("UPDATE `users` SET `attpics` = '%s' WHERE `userid` = %u", mysql_real_escape_string($picture), $userid)); } $h->endpage(); exit; ?> Now open up Preferences.php and add this line somewhere on the print preferences [url='attackimageuploader.php']Upload Attack Picture[/url] Now open up attack.php Scroll down to the bottom where the print"</table>"; and after it over write with this one print "<table width='50%' align='center'><tr><td align=right> {$odata['username']} Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10> [img=attpics/{$odata[]<tr><td align=right> {$ir['username']} Health: </tr></td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10> [img={$ir[]</td></tr></table>"; } Create a Folder on your FTP called attpics then add this to your MSQL ALTER TABLE users ADD `attpics` VARCHAR(255) NOT NULL I'll post a screenie its not brilliant but i hate tables but the pics show up at least..
  23. I was reading a POST regards it ebing able to show how many members there are Currently online. And since i havent found a post that allows users to see howm many Males and females are in the game and also that are online.. Ive made this small mod.   <?php include "globals.php"; /*count total Male members */ $sql= $db->query ("Select count(*) AS num from users where gender='Male'"); $var = $db->fetch_row($sql); print" Males Regsitered ({$var['num']}) "; /*count total Female members */ $sql= $db->query ("Select count(*) AS num from users where gender='Female'"); $var = $db->fetch_row($sql); print" Females Registerd on the game ({$var['num']}) "; /* bit of space needed here */ $sql= $db->query ("Select count(gender) AS female from users where laston >= UNIX_TIMESTAMP() - 900 ORDER BY gender='Female'"); $var = $db->fetch_row($sql); print" [url='usersonline.php']Females online now ({$var['female']})[/url] "; $sql2= $db->query ("Select count(gender) AS male from users where laston >= UNIX_TIMESTAMP() - 900 ORDER BY gender='Male'"); $var2 = $db->fetch_row($sql2); print" [url='usersonline.php']Males online now ({$var2['male']})[/url] "; ?>   Remove the include globals.php and the <? also ?> if your planning on adding it to another file as its not needed unlless you just want to use the script as it is... CALL ME DUMB ;) After I did this smoeone pointed out that MCC already has it built in but never mind. :) its here now lol
  24. Re: [mccode v2] House Images Just an update. You can basically add Items or house images to any part of the gamenand for those that are having problems heres a small Tutorial.. Each script on a page has a Different string so to speak so for example if you wanted images in the attack.php script you can still use the items or house pics code to do this.. All you have to remember is adding a new SQL to the dbase of your phpmyadmin so that pic shows up.. so we are going to use the attack script for this Demo.. create a new sql ALTER TABLE users ADD `attpics` VARCHAR(255) NOT NULL Now create a new folder on your FTP call it attpics call this file attackimageuploader.php   <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 ? Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ require("sglobals.php"); if(empty($_FILES['imagefile'])) { echo ' Upload Attack Image Image: <form name="imageuploader" method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data"> [i]Path of Image:[/i] <input type="file" name="imagefile" /> <input type="submit" name="Submit" value="Upload Image" /> </form> (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize = 1000000; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } /*What extensions can be used?*/ $valid = array('image/gif', 'image/png', 'image/pjpeg','image/jpeg', 'image/jpg'); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'attpics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/pjpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'attpics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (!$create) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path = 'attpics/'; $pic = $_FILES['imagefile']['name']; $picture = $path.$pic; $oldpic = $ir['attpics']; /*Check to see if its already uploaded*/ if ($picture == $oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $delete = @unlink($oldpic); if ($delete) { echo 'Previous image deleted from system... '; } if (!$delete) { echo 'No Previous image to be deleted... '; } $dataa = $_FILES['imagefile']['size']; $datab = $_FILES['imagefile']['type']; $datad = $_FILES['imagefile']['name']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded <u>Info:</u> Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check = mysql_query( sprintf("SELECT COUNT(*) FROM `houses` WHERE `attpics` = '%s'", mysql_real_escape_string($picture))); //$checks = mysql_fetch_array($check); if ($checks['cnt'] > 0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ mysql_query( sprintf("UPDATE `users` SET `attpics` = '%s' WHERE `attpics` = %u", mysql_real_escape_string($picture), $userid)); } $h->endpage(); exit; ?>   Now open up your attack.php Right at the bottom of that script find this line   print "<table width='50%' align='center'><tr><td align=right>Your Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10></td><tr><td align=right>{$odata['username']} Health: </td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10></td></tr></table>"; }   Notice how it says $vars but yet on the items and the houses it was either $ir or $p So aslong as you stick with the $ on the line you want to add your pics to you should have viewable pictures all the time.. so the above would be [img={$vars[] for your pic and [img={$vars2[] for your opponents image.. Keep the same basics through out the pages your adding pics to and you should be fine.
  25. Re: [mccode v2] House Images   Same error as above, but great addition! Try installing it using my Original Post see if that helps
×
×
  • Create New...