-
Posts
522 -
Credits
0 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by wongerlt
-
Request duplication fix
wongerlt replied to leonardoll174's question in Request Server Development Help [L2J]
-
Java 7 and 8 on same pc
wongerlt replied to Eleven's question in Request Server Development Help [L2J]
easy, example java -XX:+UseConcMarkSweepGC -Xmx2G -cp ./libs/*; net.sf.l2j.gameserver.GameServer just write: "C:\Program Files\Java\jdk1.8.0_171\bin\java" -XX:+UseConcMarkSweepGC -Xmx2G -cp ./libs/*; net.sf.l2j.gameserver.GameServer dont remove quates " -
Help Edit Send Moneys
wongerlt replied to criss22's question in Request Server Development Help [L2J]
you looking not here.. there is any web app? how player donate? -
thed edit spawn admin command add +50 on z cordinate maybe it will work :D idk
-
your config file or index txt file not empty? "geo_index" or just try to hit with bow to mob behind the wall to check :D
-
show ur problem, screenshot ar video
-
delete this.
-
crappy code but still u can see example: fencetable.java package com.l2jfrozen.gameserver.datatables; import java.util.ArrayList; import java.util.Collection; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.actor.instance.L2FenceInstance; import java.util.logging.Logger; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.idfactory.IdFactory; import com.l2jfrozen.util.CloseUtil; public class FenceTable { protected static Logger _log = Logger.getLogger(FenceTable.class.getName()); public static void fencedelsql(int type,int locx,int locy,int locz,int width,int length){ Connection con; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("DELETE FROM `fences` WHERE `type`='"+type+"' AND `locx`='"+locx+"' AND `locy`='"+locy+"' AND `locz`='"+locz+"' AND `width`='"+width+"' AND `length`='"+length+"'"); statement.execute(); statement.close(); CloseUtil.close(con); } catch (Exception e) { e.printStackTrace(); } } public static void fencetogame(){ int g=0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); ResultSet rset; PreparedStatement statement = con.prepareStatement("SELECT * FROM `fences` WHERE 1"); rset = statement.executeQuery(); int type; int width; int length; int height; int locx; int locy; int locz; String name; while (rset.next()) { g++; type = rset.getInt("type"); width = rset.getInt("width"); length = rset.getInt("length"); height = rset.getInt("height"); locx = rset.getInt("locx"); locy = rset.getInt("locy"); locz = rset.getInt("locz"); name = rset.getString("name"); // spawn fence for (int i = 0;i < height;i++) { L2FenceInstance fence = new L2FenceInstance(IdFactory.getInstance().getNextId(), type, width, length, locz, locy, name); fence.spawnMe(locx, locy, locz); addFence(fence); } // spawn fence } } catch (Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); } _log.warning("Loaded "+g+" fences to world."); } public static ArrayList<L2FenceInstance> fences = new ArrayList<>(); public static void addFence(L2FenceInstance fence) { fences.add(fence); } public static ArrayList<L2FenceInstance> getAllFences() { return fences; } public static void removeFence(L2FenceInstance fence) { if (fences.contains(fence)) fences.remove(fence); } public static boolean canSeeTarget(L2Object source, int x, int y) { Collection<L2Object> objects = source.getKnownList().getKnownObjects().values(); for (L2Object obj : objects) { if (obj instanceof L2FenceInstance) { L2FenceInstance fence = (L2FenceInstance) obj; if (fence.isBetween(source.getX(), source.getY(), x, y)) return false; } } return true; } public static boolean canSeeTarget(int x, int y, int tx, int ty) { for (L2FenceInstance fence : fences) { if (fence.isBetween(x, y, tx, ty)) return false; } return true; } } gameserver java FenceTable.fencetogame(); admin command: else if (command.startsWith("admin_spawnfence")) { StringTokenizer st = new StringTokenizer(command, " "); try { st.nextToken(); int type = Integer.parseInt(st.nextToken()); int width = Integer.parseInt(st.nextToken()); int length = Integer.parseInt(st.nextToken()); int height = 1; String name = ""; if (st.hasMoreTokens()) height = Math.min(Integer.parseInt(st.nextToken()), 3); if (st.hasMoreTokens()) name = st.nextToken(); for (int i = 0;i < height;i++) { L2FenceInstance fence = new L2FenceInstance(IdFactory.getInstance().getNextId(), type, width, length, activeChar.getX(), activeChar.getY(), name); fence.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ()); FenceTable.addFence(fence); fence.fencetosql(type,activeChar.getX(),activeChar.getY(),activeChar.getZ(),width,length, height,name); } } catch (Exception e) { activeChar.sendMessage("Usage: //spawnfence <type> <width> <length> [<height>]"); } } else if (command.startsWith("admin_deletefence")) { StringTokenizer st = new StringTokenizer(command, " "); st.nextToken(); int idas = Integer.parseInt(st.nextToken()); for (L2FenceInstance fencex : FenceTable.getAllFences()) { if(fencex.getObjectId()==idas) { FenceTable.fencedelsql(fencex.getType(),fencex.getX(),fencex.getY(),fencex.getZ(),fencex.getWidth(),fencex.getLength()); L2WorldRegion region = fencex.getWorldRegion(); fencex.decayMe(); region.removeVisibleObject(fencex); fencex.getKnownList().removeAllKnownObjects(); L2World.getInstance().removeObject(fencex); FenceTable.removeFence(fencex); activeChar.sendMessage("Deleted fence " + fencex.getObjectId()); listFences(activeChar); } } } else if (command.startsWith("admin_listfence")) listFences(activeChar); .... private static void listFences(L2PcInstance activeChar) { NpcHtmlMessage html = new NpcHtmlMessage(0); StringBuilder sb = new StringBuilder(); sb.append("<html><body>Total Fences: " + FenceTable.getAllFences().size() + "<br><br>"); for (L2FenceInstance fence : FenceTable.getAllFences()) sb.append("<a action=\"bypass admin_deletefence " + fence.getObjectId() + " 1\">Fence: "+fence.getNamex()+" " + fence.getObjectId() + " [" + fence.getX() + " " + fence.getY() + " " + fence.getZ() + "]</a><br>"); sb.append("</body></html>"); html.setHtml(sb.toString()); activeChar.sendPacket(html); }
-
encode questname-e.dat
wongerlt replied to wongerlt's question in Request Server Development Help [L2J]
thanks you i fixed it must look like: hunt Giants.\n 1 57 1 10 10553.000000 need collect 10 adenas. And idea with excel is best ,you help me very much :D -
Hello, i try to create simple quest on questname-e.dat tag_? quest_id quest_prog main_name prog_name description cnt1 items cnt2 num_items quest_x quest_y quest_z lvl_min lvl_max quest_type entity_name get_item_in_quest UNK_1 UNK_2 contact_npc_id contact_npc_x contact_npc_y contact_npc_z restricions short_description cnt3 req_class cnt4 req_item clan_pet_quest req_quest_complete UNK_3 area_id 1 300 1 Secret Room Hunt Giants To make a special Secret Room Scroll you need hunt Giants.\n 0 0 10553.000000 78428.000000 -3840.000000 1 80 3 Rath 0 1 1 30126 9566.000000 78373.000000 -3808.000000 No Requirements To make a special Secret Room Scroll you need hunt Giants. 0 0 0 0 0 30 and i want add quest items, i think is here cnt1 items cnt2 num_items items and num_items and is here: hunt Giants.\n 0 x 0 y 10553.000000 x and y , but when i try encrypt i got error, im using L2FileEdit. example: x=57 y=10 Tryed and with cmd l2encdec encrypt complete but get critical error in game. How to add items on quest that quest need to collect. thanks
-
looking for LF L2 Gold Pack
wongerlt replied to MrMagnistor's question in Request Server Development Help [L2J]
yes https://mega.nz/#!rNMyVQID!r3_5tU_BeLgyf-kt48Aztzn1ztu1IbHq_7hPzeZgRmI totaly no bugs, perfect balance and etc. -
LF LF L2 Custom-Avice pack
wongerlt replied to iiyama's question in Request Server Development Help [L2J]
before 2 years was shared l2gold trance files with some bug fixes and nothing more. -
TOP RITCHEST STATS PROBLEM
wongerlt replied to admirolas3's question in Request Server Development Help [L2J]
no point for one or two gm join table. -
TOP RITCHEST STATS PROBLEM
wongerlt replied to admirolas3's question in Request Server Development Help [L2J]
item_id = 57 AND count > 10 AND owner_id != 1484984 AND owner_id != 1484984 -
TOP RITCHEST STATS PROBLEM
wongerlt replied to admirolas3's question in Request Server Development Help [L2J]
oh rly, then u can connect two tables or just check by owener id. example: item_id = 57 AND count > 10 AND owner_id=1484984 -
TOP RITCHEST STATS PROBLEM
wongerlt replied to admirolas3's question in Request Server Development Help [L2J]
item_id = 57 AND count > 10 AND access_level = 0 -
use cronjobs
-
check file encode, with example notepad++ or php version, rly idk :D or if u need just write result to file. <?php $host = ''; //Hosting $user = ''; //Username $pass = ''; //Password $db = ''; //DatabaseName $top = '100'; //Top Number $countpvp = 1; try { $conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conn->query("SET NAMES 'utf8'"); } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } $out = " <table> <tr> <th align='left'>Name</th> <th align='right'> </th> <th align='right'>PvP</th> </tr> "; $pvp = "SELECT char_name, pvpkills FROM characters WHERE pvpkills > 0 AND accesslevel <= 0 ORDER by pvpkills DESC LIMIT $top "; $pvp = $conn->prepare($pvp); $pvp->execute(); while($row = $pvp->fetch() ) { $countpvp++; $out .= " <tr> <td align='left'><span>".$row['char_name']."</span></td> <td align='right'><span> </span></td> <td align='right'>".$row['pvpkills']."</td> </tr> "; } $out .= " </table> "; file_put_contents("test.doc",$out); // this save doc to next to index.php ?>
-
at same place where player get rebirth book
-
try this: <?php $host = ''; //Hosting $user = ''; //Username $pass = ''; //Password $db = ''; //DatabaseName $top = '100'; //Top Number $countpvp = 1; try { $conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conn->query("SET NAMES 'utf8'"); } catch(PDOException $e) { echo "Connection failed: " . $e->getMessage(); } header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment;Filename=test.doc"); ob_start(); echo " <table> <tr> <th align='left'>Name</th> <th align='right'> </th> <th align='right'>PvP</th> </tr> "; $pvp = "SELECT char_name, pvpkills FROM characters WHERE pvpkills > 0 AND accesslevel <= 0 ORDER by pvpkills DESC LIMIT $top "; $pvp = $conn->prepare($pvp); $pvp->execute(); while($row = $pvp->fetch() ) { $countpvp++; echo " <tr> <td align='left'><span>".$row['char_name']."</span></td> <td align='right'><span> </span></td> <td align='right'>".$row['pvpkills']."</td> </tr> "; } echo " </table> "; $out = ob_get_contents(); ob_end_clean(); echo $out; file_put_contents("test.doc",$out); // this save doc to next to index.php ?>
-
Help Website, Raid Map need help
wongerlt replied to remigas's question in Request Server Development Help [L2J]
just check results with, example print_r $row... and me suggestion dont use web and game server in same server. Use cronjobs for data update, example every 5min. -
Help Active to PASSIVE
wongerlt replied to InFocus's question in Request Server Development Help [L2J]
do you try to see others skills who have passive type? -
View File L2Gold Weapons [for L2J Frozen] L2Gold Weapons [for L2J Frozen] Includes: Client: decrypted itemname.dat, weapongrp.dat Server: stats XML file, SQL file. VirusTotal Link: https://www.virustotal.com/#/file/a8142e733cc61af7cf81bdf6b918fd4420f613a33dfc6d2a7202b8216a03c5ba/detection Submitter wongerlt Submitted 07/03/2018 Category Equipments
-
very good guide:
-
Request code for check buffs
wongerlt replied to sotid's question in Request Server Development Help [L2J]
change ur project encode to utf-8.