Jump to content

madman

Member
  • Content count

    50
  • Joined

  • Last visited

About madman

  • Rank
    Bronze Member
  • Birthday 07/13/1994
  1. does any1 know how to do this?
  2. im getting these 2 errors: Deprecated: Function mysql_list_tables() is deprecated in /home/content/88/9892588/html/vote.php on line 38 Deprecated: Function sql_regcase() is deprecated in /home/content/88/9892588/html/vote.php on line 65 [code] { if ( [MENTION=103481]Mysql[/MENTION]_connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD)) die("Could not connect to mysql database: " . mysql_error()); if ( [MENTION=103481]Mysql[/MENTION]_select_db(MYSQL_DATABASE)) die("Could not select mysql database: " . mysql_error()); $tables = mysql_list_tables(MYSQL_DATABASE);//-------------------line 38 while (list($temp) = mysql_fetch_array($tables)) { if ($temp == "votes") { return; } } query("CREATE TABLE `votes` ( `playerName` VARCHAR( 255 ) NOT NULL , `ip` VARCHAR( 255 ) NOT NULL, `time` BIGINT NOT NULL , `recieved` INT( 1 ) NOT NULL DEFAULT '0')"); } /** * query(string query) this function is used to query the mysql database server. */ function query($s) { $query = [MENTION=103481]Mysql[/MENTION]_query($s); if (!$query) die("Error running query('" . $s . "'): " . mysql_error()); return $query; } /** * anti_inject(string text) this function is used to make sure no injections can be made. */ function anti_inject($sql) { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),//---------------------->(line65) "", $sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql); $sql = strtolower($sql); return $sql; } [/code]
  3. madman

    Sprite Editor Help

    im not sure i would just go with what ever standard img size is for bg
  4. madman

    Sprite Editor Help

    at net.openrs.cache.util.CompressionUtils.gunzip(CompressionUtils.java:6 7)[B]------------------------------------>line 67[/B] at net.openrs.cache.Container.decode(Container.java:71)[B]--------> 71[/B] at net.openrs.cache.Cache.write(Cache.java:169)[B]------------->169[/B] at steve.SpriteEditorFrame.jButton1ActionPerformed(SpriteEditorFrame.jav a:561)-[B]-----> 561[/B] at steve.SpriteEditorFrame$10.actionPerformed(SpriteEditorFrame.java:271 )-[B]----------------------------->271[/B] look on the lines and files it tells you and see if you notice anything wrong with it
  5. [code] case 162: if(player.getTemporaryAttribute("buying") == Boolean.TRUE) { amount += 1; } else { amount = 1; } break; case 164: if(player.getTemporaryAttribute("buying") == Boolean.TRUE) { amount += 10; } else { amount = 10; } break; case 166: if(player.getTemporaryAttribute("buying") == Boolean.TRUE) { amount += 100; } else { amount = 100; } break; case 168: if(player.getTemporaryAttribute("buying") == Boolean.TRUE) { amount += 1000; } else { amount = player.getInventory().getContainer().getNumberOff(id); } break; [/code] how would i add a cap to how much you can buy in a ge
  6. [code] <?php /** * mysql database hostname */ define("MYSQL_HOST", "*******"); /** * mysql username to connect to the database server */ define("MYSQL_USERNAME", "*****"); /** * mysql password the password to connect to the database server */ define("MYSQL_PASSWORD", "******"); /** * mysql database the database name in which you have your vote table setup */ define("MYSQL_DATABASE", "*****"); /** * Where you want them redirected after voting */ define("VOTE_URL", "/forums"); /** * The number of hours between voting */ define("VOTE_HOURS", 24); /** * connect() this function is used to connect to the mysql database server. */ function connect() { if ( [MENTION=103481]Mysql[/MENTION]_connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD)) die("Could not connect to mysql database: " . mysql_error()); if ( [MENTION=103481]Mysql[/MENTION]_select_db(MYSQL_DATABASE)) die("Could not select mysql database: " . mysql_error()); $tables = mysql_list_tables(MYSQL_DATABASE); while (list($temp) = mysql_fetch_array($tables)) { if ($temp == "votes") { return; } } query("CREATE TABLE `votes` ( `playerName` VARCHAR( 255 ) NOT NULL , `ip` VARCHAR( 255 ) NOT NULL, `time` BIGINT NOT NULL , `recieved` INT( 1 ) NOT NULL DEFAULT '0')"); } /** * query(string query) this function is used to query the mysql database server. */ function query($s) { $query = [MENTION=103481]Mysql[/MENTION]_query($s); if (!$query) die("Error running query('" . $s . "'): " . mysql_error()); return $query; } /** * anti_inject(string text) this function is used to make sure no injections can be made. */ function anti_inject($sql) { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"), "", $sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql); $sql = strtolower($sql); return $sql; } /** * clean_request(int timestamp, string username) this function is used to delete any entries if they have already expired. */ function clean_request($time, $username) { $query = query("SELECT * FROM `votes` WHERE `playerName`='" . $username . "'"); if (mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); $timerequested = $row['time']; if ($time - $timerequested > VOTE_HOURS * 3600) query("DELETE FROM `votes` WHERE time='" . $timerequested . "'"); } } /** * vote_entries(string ip) this function is used return the number of rows within the table */ function vote_entries($ip) { $query = query("SELECT * FROM `votes` WHERE ip='" . $ip . "'"); return mysql_num_rows($query); } /** * This is the actual working of the script please do not touch anything below if you do not know what you are doing... */ if (isset($_POST['submit']) || isset($_GET['username']) && isset($_GET['type'])) { connect(); if ($_POST['submit']) { if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1)) die("Sorry but you have port 80 open, this is to stop voting by proxy address."); if(isset($_COOKIE['voted'])) die("Sorry but it looks like you have already voted..."); $username = anti_inject($_POST['username']); $ip = gethostbyaddr($_SERVER['REMOTE_ADDR']); clean_request(time(), $username); if (vote_entries($ip) == 0) { setcookie ("voted", "yes", VOTE_HOURS * 3600); query("INSERT INTO `votes` (`playerName`, `ip`, `time`) VALUES ('" . $username . "', '" . $ip . "', '" . time() . "')"); header("Location: " . VOTE_URL . ""); } else { die("You have already voted once today."); } } elseif ($_GET['type'] == "checkvote") { $username = anti_inject($_GET['username']); $query = query("SELECT * FROM `votes` WHERE `playerName`='" . $username . "'"); if (mysql_num_rows($query) == 1) { $results = mysql_fetch_array($query); if ($results['recieved'] == 0) { query("UPDATE `votes` SET `recieved`='1' WHERE `playerName`='" . $username . "'"); die("user needs reward..."); } else { die("user been given reward..."); } } else { die("Vote not found... ". $username ."."); } } } ?> <html> <head> <title>Raging-Nemesis - Vote4Cash</title> <style type="text/css"> body { background-color: #222222; font-family:Arial; } .link { cursor:pointer; color: #037; text-decoration: underline; } .link:hover { color: #ADD8E6; } .link-done { cursor:pointer; color: #222222; text-decoration: line-through; } .link-done:hover { color: #ADD8E6; } #container { background-color: #222222; height: auto; width: 500px; padding: 5px; border: 1px solid #ADD8E6; margin: 0 auto auto auto; -moz-box-shadow: 0 0 5px #ADD8E6; -webkit-box-shadow: 0 0 5px #ADD8E6; box-shadow: 0 0 5px #ADD8E6; } #help { background-color: #222222; height: auto; width: 500px; padding: 5px; border: 1px solid #222222; margin: 0 auto auto auto; -moz-box-shadow: 0 0 5px #ADD8E6; -webkit-box-shadow: 0 0 5px #ADD8E6; box-shadow: 0 0 5px #ADD8E6; } </style> <script type="text/javascript"> var timer; var timeLeft = 30; var voted1 = false; var voted2 = false; var voted3 = false; var voted4 = false; var voted5 = false; function clickedLink(button) { switch(button) { case 1: voted1 = true; javascript:window.open('http://www.runelocus.com/toplist/vote-17816.html', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote1").setAttribute("class", "link-done"); break; case 2: voted2 = true; javascript:window.open('http://www.rune-server.org/top.php?act=vote&sid=6746', '60', 'left = 20, top = 20, width = 800, height = 600, toolbar = 0, resizable = 0, scrollbars=1'); document.getElementById("vote2").setAttribute("class", "link-done"); break; } setSitesLeft(); if (voted1 && voted2) { startCountDown(); document.getElementById('statusText').style.display = 'none'; } } function startCountDown() { timer = setInterval("doCountDown();", 1000); document.getElementById('timerText').style.display = 'block'; } function doCountDown() { document.getElementById('timeLeft').innerHTML = timeLeft; timeLeft = (timeLeft - 1); if (timeLeft <= 0) { document.getElementById('links').style.display = 'none'; document.getElementById('voted').style.display = 'block'; clearTimeout(timer); } } function setSitesLeft() { var count = 2; if (voted1) { count = (count - 1); } if (voted2) { count = (count - 1); } if (voted3) { count = (count - 1); } if (voted4) { count = (count - 1); } if (voted5) { count = (count - 1); } document.getElementById('sitesLeft').innerHTML = count; } </script> </head> <body> <center><img src="http://i.imgur.com/k8lBZ.png" /></center><br /> <div id="help"><strong>How It Works:</strong><br /><br />Vote on each of the links below once you have voted on all of them you will be forwarded to A page that will allow you to input your username. When you are on this page make sure you put in your username and accept. Once in game type ::voted to receive your reward!</div><br /> <div id="container"> <div id="links"> 1. <a id="vote1" onclick="clickedLink(1);" class="link">RuneLocus</a> <br> 2. <a id="vote2" onclick="clickedLink(2);" class="link">Rune-Server</a> <br> <span id="statusText">Click & vote at all the links above to continue, only <b id="sitesLeft">2</b> left.</span> <span id="timerText" style="display: none;">You have <b id="timeLeft">*</b> seconds left before you can claim you reward. </span> </div> <div id="voted" style="display: none;"> <form action="vote.php" method="post"> <center>Username: <input type="text" name="username" /> <input type="submit" name="submit" value="Claim Reward!" /></center> </form> </div> </div> </body> </html> [/code] im using godaddy mysql there using php 5.0 i could use some help with this although i payed some1 to do it but they keep telling me to switch host which im not paying more money for. idk where to put this :/ ill move it if its wrong sec
  7. madman

    adding magic damage

    any 1 know how to add the magic damage boost
  8. madman

    adding magic damage

    [code] public void setEquipmentBonus() { int a = bonuses.getBonus(0); int b = bonuses.getBonus(1); int c = bonuses.getBonus(2); int d = bonuses.getBonus(5); int dc = bonuses.getBonus(6); int ds = bonuses.getBonus(7); int m = bonuses.getBonus(8); int mm = bonuses.getBonus(3); int e = bonuses.getBonus(10); int p = bonuses.getBonus(11); int s = bonuses.getBonus(12); int f = bonuses.getBonus(4); int g = bonuses.getBonus(9); actionSender.sendString("Stab: "+a, 667, 36); actionSender.sendString("Slash: "+b, 667, 37); actionSender.sendString("Crush: "+c, 667, 38); actionSender.sendString("Magic: "+mm, 667, 39); actionSender.sendString("Ranged: "+f, 667, 40); actionSender.sendString("Stab: "+d, 667, 41); actionSender.sendString("Slash: "+dc, 667, 42); actionSender.sendString("Crush: "+ds, 667, 43); actionSender.sendString("Magic: "+m, 667, 44); actionSender.sendString("Ranged: "+g, 667, 45); actionSender.sendString("Strength: +"+e, 667, 48); actionSender.sendString("Ranged Str: +"+s, 667, 50); actionSender.sendString("Prayer: +"+p, 667, 49); actionSender.sendString("Summoning: 0", 667, 46); actionSender.sendString(bonuses.weight[0]+"kg", 667, 32); [/code] i dont know if its it but i cant think of anything else i have tried to add int to the item def but doesnt work and im not sure how i would go about adding it
  9. ok for some reason my imps wont re-spawn and its making things hard for hunter because i have to refresh the server and i have never set up a timer (lol im a noob for that :o )
  10. bump still looking for dual arena
  11. madman

    562 hunter problem

    yeah tried that though that was the problem 2 but i guess not
  12. madman

    562 hunter problem

    [code] case 6055://Baby imp if(!p.isAnimating()) { p.turnTo(n); p.animate(6605); World.getWorld().registerEvent(new Event(500) { [MENTION=15855]Over[/MENTION]ride public void execute() { if(!n.isDead() && p.DoubleXP == false) { n.setDead(true); n.setHidden(true); n.getDefinition().getRespawn(); p.getActionSender().sendMessage("You catch the baby impling!"); p.getInventory().addItem(11238, 1); p.getSkills().addXp(21, 10005); } if(!n.isDead() && p.DoubleXP == true) { n.setDead(true); p.getActionSender().sendMessage("You catch the baby impling!") p.getInventory().addItem(11238, 1); p.getSkills().addXp(21, 20010); } } }); } break; [/code] i cant get the imp to respawn
  13. still looking for everything on the list
  14. madman

    command ::player help

    i fixed the problem ty hash for trying to help
  15. madman

    command ::player help

    any other ideas because im still trying to mess with it and still not working running out of ideas :(
×