Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. to make the links change colour when you hover the mouse over the link put this in your header.php where the other CSS stuff is.   a:hover { color: gold ; } change the colour GOLD to whatever you want lol. not 100% sure on the image one tho... but i think this will work...   a:link img, a:visited img{ border: none; } a:focus img, a:hover img, a:active img{ border:2px solid gold; } and just put a link on the image like this..   [url='index.php'][img=images/index.jpg][/url]
  2. cool thanks, how long you think it be until its back up?
  3. hi, im wondering can anyone make this for me and can you give me a link to a page who has already made this mod. i have searched but had no luck... its a crystals market where you can buy a quanity of crystals on the market like say... a player had 1512 crystals on the market you can have the option of buying between 1-1512 crystals. and say you buy 12 crystals from that player who put the crystals up. there will then be 1500 crystals left on the market. hopefully you understand what i mean lol. thanks, Nicholas.
  4. ive done it now. took me quite abit of editing but ive got it to work now lol.
  5. hi everyone, im wondering could anyone please make me a job modification where you have to click on a link to claim yourjob payment in (stats and money) everyday??? this will stop players that quit or not played in a while getting money and stats for not even playing. hopefully you understand what kind of modification im talking about :)
  6. doesnt work :( just says Sorry, we dont allow advertising or swear words... > Go Back < when i typed "test" and then tried to send it.
  7. damn wait that dont work... can anyone help me? this is my sending function? can someone add that preg thing in for me to make it work?   function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. [url='mailbox.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. [url='mailbox.php']> Back <[/url]"); } $codes = array( ':)', ';)', ':o', ':D', ':s', ':(', 'angry', 'kissy', 'clapping', 'drool', 'crying', 'hyper', 'newbie', 'rolleyes', 'shock', 'thumbsup', ':P', 'yawn', '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', ); $images = array( '[img=smilies/smile.gif]', '[img=smilies/wink.gif]', '[img=smilies/shock.gif]', '[img=smilies/happy.gif]', '[img=smilies/confused.gif]', '[img=smilies/sad.gif]', '[img=smilies/angry.gif]', '[img=smilies/kissy.gif]', '[img=smilies/clapping.gif]', '[img=smilies/drool.gif]', '[img=smilies/cry1.gif]', '[img=smilies/hyper.gif]', '[img=smilies/newbie.gif]', '[img=smilies/rolleye.gif]', '[img=smilies/shock.gif]', '[img=smilies/thumbsup.gif]', '[img=smilies/tongue.gif]', '[img=smilies/yawn.gif]', '[b]', '[/b]', '[i]', '[/i]', '<u>', '</u>', ); $newmsg = str_replace($codes, $images, $msg); $to=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$to}'"); if($db->num_rows($q)==0) { die("<font color=white>You cannot send mail to nonexistant users. [url='mailbox.php']> <font color=white>Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}"); print "<font color=white>Message sent. [url='mailbox.php']> <font color=white>Back[/url]"; }
  8. ahh figured it out... sorry about the post... knew ill figure it out once i done this post...   function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if(!preg_match('~(.?).(http|www|.com|.co.uk|.info|.co.cc|fuck|nob|fanny|vagina|dick|.net|bitch|gay|shit)~i', $_POST['message'])) { print "Sorry, we dont allow advertising or swear words... [url='index.php']> Go Back <[/url]"; $h->endpage(); exit; }
  9. hi, you know in mailbox... where can i put this to stop advertising and swear words? hopefully ive done it right... if not can someone correct it for me? sorry about swear words btw...   if(!preg_match('~(.?).(http|www|.com|.co.uk|.info|.co.cc|fuck|nob|fanny|vagina|dick|.net|bitch|gay|shit)~i', $_POST['message'])) { print "Sorry, we dont allow advertising or swear words... [url='index.php']> Go Back <[/url]"; } else {   yes i made them lines myself from scratch lol, and im not a good coder really still beginner so not 100% sure its correct... where can i put that text? which function and where? i tried putting it in the (function mail_send) part but cant figure it out where to put it to prevent well that lol.
  10. has anyone made this mod yet? im still looking for it?
  11. the first suggestions.php is the same copy as the one on my game and it works fine. i havnt moditfied it or anything... so idk why its not working for you.
  12. no idea what the max is, but who cares as long as players dont have to worry about reaching the max stats in their life time, its fine lol. how can a player reach 100,000,000,000,000,000,000 in stats? lol. its kinda impossible. also what do you mean by economy retrieval? get the players to send you most of the money they have and then change the bank interests each day or something? lol. and lower the money gained in streets and etc... lol.
  13. which suggestions.php and also it works on my game? so idk why its blank on yours?
  14. no i dont think you do lol. edited it.
  15. try this mate, (ive never tried to code in sprintf... so dont blame me if it doesnt work. this my first attempt... lol) ive probably edited this post few times to try and get it right lol. (not tested tho)   <?php /* Created by raDiO acTivE ~ Free script for CE users Please leave this notice here as courtesy Free Revamp of MCcode V2 Enjoy */ include "globals.php"; print "<h3>Item Market</h3>"; switch($_GET['action']) { case "buy": item_buy(); break; case "gift1": item_gift1(); break; case "gift2": item_gift2(); break; case "remove": itemm_remove(); break; case "delete": item_delete(); break; default: imarket_index(); break; } function imarket_index() { global $db,$ir,$c,$userid,$h; print "Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Item</th> <th>Price</th> <th>Links</th> </tr>"; $q = $db->query("SELECT im.`imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, i.`itmid`,`itmtype`,`itmname`, u.`userid`,`username`, it.`itmtypeid`,`itmtypename` FROM itemmarket im LEFT JOIN `items` i ON im.imITEM = i.itmid LEFT JOIN `users` u ON u.userid = im.imadder LEFT JOIN `itemtypes` it ON i.itmtype = it.itmtypeid ORDER BY i.itmtype, i.itmname ASC" ); // Created by raDiO acTivE ~ Free script for CE users $lt=""; while ( $r=$db->fetch_row($q) ) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; echo"\n <tr style='background: gray;'> <th colspan=4>{$lt}</th> </tr> "; } if($r['imCURRENCY']=="money") { $price="\$".number_format($r['imPRICE']); } else { $price = number_format($r['imPRICE'])." silvers"; } if($r['imADDER'] == $userid) { $link = "[[url='itemmarket.php?action=remove&ID=".$r[']Remove[/url]]"; } else { $link = " [[url='itemmarket.php?action=buy&ID=".$r[']Buy[/url]] [[url='itemmarket.php?action=gift1&ID=".$r[']Gift[/url]]"; } if($ir['user_level'] == 2) { $del = " [[url='itemmarket.php?action=delete&ID=".$r[']Delete[/url]]"; } echo "\n <tr> <td> [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['itmname']}</td> <td>$price</td> <td>[[url='iteminfo.php?ID={$r[']Info[/url]] $link $del</td> </tr>"; } } function itemm_remove() { global $db,$ir,$c,$userid,$h; $r = sprintf(" SELECT im.`imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, i.`itmid`,`itmtype`, FROM `itemmarket` im LEFT JOIN `items` i ON `im.imITEM` = %d WHERE `imID` = %u AND `imADDER` = %d", i.itmid, mysql_real_escape_string($_GET['ID']), $userid); $q = $db->query($r); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or you are not the owner. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $delete = sprintf("DELETE FROM `itemmarket` WHERE imID= %u", mysql_real_escape_string($_GET['ID']) ); $db->query($delete); $insert = sprintf("INSERT INTO `imremovelogs` (imrID,imrITEM,imrADDER,imrREMOVE,imrIMID,imrINVID,imrTIME,imrCONTENT) VALUES (%d,%d,%d,%d,%d,%u,unix_timestamp(), {$ir['username']} removed a {$r['itmname']} from the item market.) ", '', $r['imITEM'], $r['imADDER'], $userid, $r['imID'] , $i, $ir['username'] ); echo " Item removed from the market. [url='itemmarket.php']> Back[/url]"; } // Created by raDiO acTivE ~ Free script for CE users function item_buy() { global $db,$ir,$c,$userid,$h; $q = $db->query(sprintf("SELECT `imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, FROM `itemmarket` im LEFT JOIN `items` i ON i.itmid = %d WHERE imID = %u", im.imITEM, mysql_real_escape_string($_GET['ID']) ) ); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r = $db->fetch_row($q); $curr = $r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { echo "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query(sprintf("DELETE FROM `itemmarket` WHERE `imID`=%u", mysql_real_escape_string($_GET['ID']) )); $db->query(sprintf("UPDATE`users` SET $curr = %d - %d WHERE userid=%d", $curr, $r['imPRICE'], $userid)); $db->query(sprintf("UPDATE `users` SET $curr = %d + %d WHERE userid = %u", $curr, $r['imprice'], $r['imADDER'] )); if($curr=="money") { event_add($r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).". "); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbBUYER,imbADDER,imbREMOVE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); // Created by raDiO acTivE ~ Free script for CE users echo "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])."."; } else { event_add( $r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals."); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbBUYER,imbADDER,imbREMOVE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); echo "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." silvers."; } } function item_gift1() { global $db,$ir,$c,$userid,$h; $q = $db->query(sprintf("SELECT `imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, FROM `itemmarket` im LEFT JOIN `items` i ON i.itmid = %d WHERE imID = %u", im.imITEM, mysql_real_escape_string($_GET['ID']) ) ); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r = $db->fetch_row($q); $curr = $r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { echo "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } // Created by raDiO acTivE ~ Free script for CE users $get = $_GET['ID']; $var = "Buying the [b]%d[/b] for \$".number_format('%d')." as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='%d' /> Reciever: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /> </form>"; $iab = "Buying the [b]%d[/b] for ".number_format('%d')." silvers as a gift... <form action='itemmarket.php?action=gift2' method='post'> <input type='hidden' name='ID' value='%d' /> Reciever: ".user_dropdown($c,'user')." <input type='submit' value='Buy Item and Send Gift' /> </form>"; if($curr=="money") { printf($var,$r['itmname'],$r['imPRICE'],$get); } else { printf($iab,$r['itmname'],$r['imPRICE'],$get); } } // Created by raDiO acTivE ~ Free script for CE users function item_gift2() { global $db,$ir,$c,$userid,$h; $q = $db->query(sprintf("SELECT `imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, FROM `itemmarket` im LEFT JOIN `items` i ON i.itmid = %d WHERE imID = %u", im.imITEM, mysql_real_escape_string($_GET['ID']) ) ); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r = $db->fetch_row($q); // Created by raDiO acTivE ~ Free script for CE users $curr = $r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { echo "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($_POST['user'], $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query(sprintf("DELETE FROM `itemmarket` WHERE `imID`=%u", mysql_real_escape_string($_GET['ID']) )); $db->query(sprintf("UPDATE`users` SET $curr = %d - %d WHERE userid=%d", $curr, $r['imPRICE'], $userid)); // Createed by raDiO acTivE ~ Free script for CE users $db->query(sprintf("UPDATE `users` SET $curr = %d + %d WHERE userid = %u", $curr, $r['imprice'], $r['imADDER'] )); if($curr=="money") { event_add($r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).". "); event_add($_POST['user'], "<a href='viewuser.php?u=$userid'> {$ir['username']}</a> bought you a {$r['itmname']} from the item market as a gift."); $u = $db->query(sprintf("SELECT `username` FROM `users` WHERE `userid` = '%u' ", mysql_real_escape_string($_POST['user']))); $uname = $db->fetch_single($u); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbBUYER,imbADDER,imbREMOVE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); { event_add( $r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals."); event_add( $_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you a {$r['itmname']} from the item market as a gift."); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbBUYER,imbADDER,imbREMOVE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); echo "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." silvers and sent the gift to $uname."; } } function item_delete() { global $db,$ir,$c,$userid,$h; if($ir['user_level']> 2) { die("403"); } $r = sprintf("SELECT im.`imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, i.`itmid`,`itmtype`, FROM `itemmarket` im LEFT JOIN `items` i ON `im.imITEM` = %d WHERE `imID` = %u AND `imADDER` = %d",i.itmid, mysql_real_escape_string($_GET['ID']),$userid); $q = $db->query($r); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']Go Back[/url]"; $h->endpage(); exit; } $delete = sprintf("DELETE FROM `itemmarket` WHERE imID= %u",mysql_real_escape_string($_GET['ID']) ); $db->query($delete); echo "You Deleted The Item From The Market. [url='itemmarket.php']Go Back[/url]"; } } $h->endpage(); ?>
  16. i know lol. i put it up for a joke lol, but it still makes it so you dont have to worry about players complaining that they cant go any higher in stats for rest your life lol.
  17. ALTER TABLE `userstats` CHANGE `strength` `strength` DECIMAL( 50, 4 ) NOT NULL DEFAULT '0.0000'; ALTER TABLE `userstats` CHANGE `strength` `agility` DECIMAL( 50, 4 ) NOT NULL DEFAULT '0.0000'; ALTER TABLE `userstats` CHANGE `strength` `guard` DECIMAL( 50, 4 ) NOT NULL DEFAULT '0.0000'; ALTER TABLE `userstats` CHANGE `strength` `labour` DECIMAL( 50, 4 ) NOT NULL DEFAULT '0.0000'; ALTER TABLE `userstats` CHANGE `strength` `IQ` DECIMAL( 50, 4 ) NOT NULL DEFAULT '0.0000'; or just run this sql and your max for stats be this 100,000,000,000,000,000,000 lol.
  18. lol, i know... it was a joke lol.
  19. cheers :)
  20. feel free to tell haha.
  21. could help if you post your shopindex.php lol. but anyways find line 44 and then change mysql_fetch_array into $db->fetch_row
  22. sure ill have this battle ladder :) ive been looking for a battle ladder system for while, one that isnt hard to set up and etc.
  23. lol thanks. now im trying to figure out how to convert the inventory qty into item market but i bet i wont beable too...
  24. i think that worked :) thanks Dayo.
  25. ok in itemmarket.php find this line   case "remove": itemm_remove(); break;   and under it put this   case "delete": item_delete(); break;   then find   [[url='itemmarket.php?action=gift1&ID={$r[']Gift[/url]]"; }   under it put this   if($ir['user_level'] == 2) { $del = "<center>[[url='itemmarket.php?action=delete&ID={$r[']Delete[/url]]"; }   then find   <td>[[url='iteminfo.php?ID={$r[']Info[/url]] $link</td>   next to $link put $del like this   $link $del   then find   $h->endpage(); ?>   on top of it add this   function item_delete() { global $db,$ir,$c,$userid,$h; if($ir['user_level'] > 2) { die("403"); } $q=$db->query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}",$c); if(!$db->num_rows($q)) { print "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $db->query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}"); print "Deleted The Item From The Market. [url='itemmarket.php']Go Back[/url]"; }   thats it lol, any problems feel free to post it up here... all it does is add a function for the admins to delete the item from the item market instead of having to go into phpmyadmin (database) and finding the item to delete it.
×
×
  • Create New...