Jump to content

DarkKnightCZ

Members
  • Posts

    58
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by DarkKnightCZ

  1. jamaicastylerz: only 9014 and 7777 he should open (9014 is between loginserver and gameserver :) with this port open ,really easy to hack)
  2. i think on l2jserver forum is one (but that version i had wasnt exactly right working (npc problem with handler))
  3. for l2jserver it is in l2jmods.properties
  4. supermac: you have to do three things 1) open mysql configuration file (my.cnf, for linux /etc/mysql/my.cnf), find "bind-address" (without "), edit ip 127.0.0.1 to your internal IP or rem it (add # before) 2) set up port forwarding on router to your internal IP and port 3306 3) create new user (you have to add ip of your webserver like this, you have site google.com, ip of google.com is 74.125.87.106 -> create this user - webstatus@74.125.87.106 => this will limit connection from given IP) but, this is extremly dangerous, you will be vulnerable to many attacks, point 3 will help only for some type of attacks //edit Leki: yes, it is hard cause mysql can listen on one ip or on all ips (cant listen on only 2) supermac: if you wont be able to start lineage server after step 1, rem that line (add # before bind-address), this will set mysql to listen on every internal IPs
  5. yep, you are right, xampp sucks, but you really have error in your sql syntax that sql is totaly wrong, you have ,' after ,'8','25', you have 47 rows but only 42 inputs (like you wanna import 42 strings into 47 collumns)
  6. Hozian: replace mysql_query("INSERT INTO accounts (login, password, access_level) VALUES ('".$_POST['name']."', '".base64_encode(pack('H*', sha1($_POST['pass'])))."', 0)") with mysql_query("INSERT INTO accounts (login, password, accesslevel) VALUES ('".$_POST['name']."', '".base64_encode(pack('H*', sha1($_POST['pass'])))."', 0)") and dont reply to old topics :)
  7. Leki: absolutely useless 1) you have ByLeki.properties (and most of us dont) 2) what about freight? (or dualbox) 3) that patch is useless (if i wanna use it, i must rewrite it) and server with 50M start adena? it has rates 10k?
  8. dude, seriously, learn english :) i cant understand it at all but, set whole loginserver.properties (all ips etc.), this should help
  9. if you really have external ip transferet to your router and port forwarding is ok, forget about windows vista :) install ubuntu and run it (cause sharing on windows vista/windows 7 is worse than hell :) )
  10. you have to set external IP in gameserver config, then your friends have to have original l2.ini (if you wanna use hosts file), then it will work (of course if you running that server under windows, especially win7 (win7 has lame net sharing), it probably wont work due to firewalls and other microsoft stuff)
  11. SoRa,liviudev: if you edit it (not apply patch), it will work (but there is that error as i wrote - L2NpcInstance: Unknown NPC bypass: "ctf_player_join eventShuffle" NpcId: 70004)
  12. Leki: he wants item which will give him 2 items with different chances disoder25: did you try id_of_item;id_of_festivaladena,1,chance id_of_item;id_of_scroll,1,chance ?
  13. pReDiCtaBle: doesnt matter if this "words" are used in l2j or not, they are reserved words in every java project :) JvER: for someone its usefull, but java 6 has plenty of this words (not just these), so it is like "incomplete" anyway nice share :)
  14. great share, but i have one problem i ported it to l2j epilogue, but when i set up event, npc will spawn, but it isnt responding (it is like i spawned it normally), anyone who can help? //edit: GS ERROR L2NpcInstance: Unknown NPC bypass: "ctf_player_join eventShuffle" NpcId: 70004
  15. not bad, but for modern websites are "guidpostes" useless (yes, five years ago, it was soo popular :)) anyway looks nice (but the main picture should be on whole site (not cut at the buttons)) (also it will take a lot of traffic if it has 378kb :) )
  16. exah: the main function is that you have "book" in your inventory, if you read it, you can teleport to farming locations, if you cant teleport, you probably didnt import sqls / didnt edited java code / didnt create htmls :) vagos123: its cool idea, but for some server absolutely useless (cause they can kill someone and "escape via this book", or something like this :) ), but nice share and dont stop contributing :)
  17. design isnt bad, but for lineage absolutelly useless :) for lineage some dark collors, this looks like wordpress :)
  18. ExTrEmEDwarf: what hole? if you change input on login, wont work (every protection against it in login.php (mysql_real_escape_string, sprintf) ) , if you change input inside it, the same thing (m_r_e_s, sprintf), but i you know some hole in it, post it, i will repair it :)
  19. oh sorry, created and tested by me :) //edit (and now 100% working (i was reworking it on fly, so that zip archive wasnt completed (also there was error in login.php) )
  20. Since i've been making new epilogue server, i made a lot of scripts, so im posting some here :) this one will teleport given character to some location (in radius 30) Protections: simple antibot protection (bots usually cant use javascript), protection against sql injection etc What does it do: simple login to your account, picture of characters of that account (and you choose one char), teleport to given location So First, make file called index.php, inside this file insert this <script type="text/javascript"> function login_teleport(){ user=document.getElementById("user"); password=document.getElementById("password"); if(user.value==""){ alert("Empty username"); }else if(password.value==""){ alert("Empty password"); }else{ document.getElementById("login").submit(); } } </script> <h1>Emergency teleport</h1> <form id="login" action="login.php" method="POST"> Username : <input type="text" id="user" name="user" /><br /> Password : <input type="password" id="password" name="password" /><br /> <input type="button" value="login" onclick="javascript:login_teleport();" /> </form> then create file called login.php, inside it insert <?php session_start(); if(!empty($_POST["user"])){ include('config.php'); $query=sprintf("SELECT login,password FROM accounts WHERE login='%s' LIMIT 1",mysql_real_escape_string($_POST["user"])); $row=mysql_fetch_array(mysql_query($query)); echo $row["login"]; if($row["login"] != null){ $password=$_POST["password"]; $password_crypted=base64_encode(pack("H*",sha1(utf8_encode($password)))); if($row["password"]==$password_crypted){ $_SESSION["user"]=$row["login"]; print ' <script type="text/javascript"> document.location="teleport.php"; </script> '; } else{ print ' <script type="text/javascript"> alert("Wrong password"); document.location="index.php"; </script> '; } }else{ print ' <script type="text/javascript"> alert("Wrong username"); document.location="index.php"; </script> '; } } ?> then file teleport.php <?php session_start(); if($_SESSION["user"]!=null){ include('config.php'); if(!empty($_POST["char"])){ $loc_x=$loc_x-$radius+rand(0,$radius*2); $loc_y=$loc_y-$radius+rand(0,$radius*2); $query=sprintf("UPDATE `characters` SET `x` = '%d',`y` = '%d',`z` = '%d' WHERE `charId` =%d;", $loc_x, $loc_y, $loc_z, mysql_real_escape_string($_POST["char"])); if(mysql_query($query)){ print "<h2>Successfully teleported</h2>"; }else{ print '<h2>' . mysql_errno() . ':' . mysql_error(); } print "<br /><hr /><br />"; } $query=mysql_query("SELECT charId,char_name FROM characters WHERE account_name = '" . $_SESSION["user"] . "'"); print 'This will teleport you to Town of Giran : center'; print '<br /><br />'; print "Please select your character"; print '<form action="teleport.php" method="POST">'; print '<select name="char">'; while($row=mysql_fetch_array($query)){ print('<option value="' . $row["charId"] . '">' . $row["char_name"] .'</option>'); } print '</select>'; print '<input type="submit" value="Teleport" />'; print '</form>'; print '<br /><br /><br />'; print '<a href="logout.php">Logout</a>'; } else{ header("Location: index.php"); } ?> then logout.php <?php session_start(); session_destroy(); header("Location: index.php"); ?> and finally config.php <?php mysql_connect("localhost","root","password") or die(mysql_error()); mysql_select_db("l2jdb") or die(mysql_error()); $loc_x="83369"; $loc_y="148606"; $loc_z="-3404"; $radius="30"; ?> (in place of localhost put your mysql host, root is username, password is password and l2jdb is mysql database) $loc_x,$loc_y,$loc_z are coordinates (in game try /loc, it will show you your current location) Beware: Choose only large area (teleport is random, so like 20 persons wont be on the same position) (radius 30, change it if you want) if you want only php function, there it is function teleport($loc_x,$loc_y,$loc_z,$radius,$charId){ $loc_x=$loc_x-$radius+rand(0,$radius*2); $loc_y=$loc_y-$radius+rand(0,$radius*2); $query=sprintf("UPDATE `characters` SET `x` = '%d',`y` = '%d',`z` = '%d' WHERE `charId` =%d;", $loc_x, $loc_y, $loc_z, mysql_real_escape_string($charId)); if(mysql_query($query)){ print "<h2>Successfully teleported</h2>"; }else{ print '<h2>' . mysql_errno() . ':' . mysql_error(); } } usage <?php teleport("location x","location y","location z", "radius", "character ID selected from database"); ?> and finally : direct download to whole script :) (on private ftp, so this has hide) [Hidden Content] Credits : DarkKnight / DarkKnightCZ
  21. HouLiGaN : no, it is for website :) crazynoodle: i think it would work, but i dont know, how ucoz works, so if you send me it, i can modify it and post here guide :) //edit Leki: but if you have apache server with mod_php, it will work :)
  22. remixed: eh? in english please :) (that sentence doesnt make sense :) )
  23. this script shows all clanhalls (Name,Location,Lease,Paid until), if clanhall is free, in column paid until will shows "Free" Screen Script <?php $username = "root"; //your mysql username $password = "root"; //your mysql password $host = "localhost"; //your mysql host $database = "l2jdb"; //your mysql/lineage database mysql_connect($host,$username,$password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); $query = mysql_query("SELECT name,location,lease,paidUntil FROM clanhall ORDER BY location ASC"); print "<table>"; print "<tr bgcolor='#707070' style='color:#ffffff;'><th>Name</th><th>Location</th><th>Lease</th><th>Paid until</th></tr>"; $i=1; while($row=mysql_fetch_array($query)){ if($i%2==0){ $bgcolor='#e3e3e3'; }else{ $bgcolor='#a6a6a6'; } if($row[paidUntil]==0){ $paiduntil="Free"; }else{$paiduntil=$row[paidUntil];} print "<tr bgcolor='" . $bgcolor . "'><td>" . $row[name] . "</td><td>" . $row[location] . "</td><td>" . $row[lease] . "</td><td>" . $paiduntil . "</td></tr>"; $i++; } print "</table>"; ?> Credits: Me (DarkKnight / DarkKnightCZ) but cant guarantee paid until (dont have syntax of that table), if someone sends me syntax of paidUntil (in clanhalls table in database), i will update it and if you wanna script for showing free clanhalls only or if you wanna add some collumn (like owner), just tell :)
  24. yamimarik: works on every project you didnt set right password and username in config.php and in config.php you have some error on line 8 btw Leki edit this Finaly Create and write <?php require("Config.php");... to Finaly Create and write <?php require("config.php");... (big c in config.php (for almost every server wont work if letters are different (c has another postition in ascii table than C) ) ) and one extension :) if you wanna show only online users (not GMs), replace that mysql_query with SELECT count(*) FROM characters WHERE online = 1 AND accesslevel = 0 anyway, good share edit : Spiros: not effective, too much "sql queries" for "fully loaded database" while running l2 servers (with count(*) like Leki wrote its better) edit no2: Spiros: you have bad syntax, it wont run ;-)
  25. picassooo: it doesnt matter, every image you find by google is probably protected by copyright
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..