-
Posts
543 -
Credits
0 -
Joined
-
Last visited
-
Days Won
7 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by wongerlt
-
LF Server Load PHP Script
wongerlt replied to Gam3Master's question in Request Server Development Help [L2J]
Its simple, one example: <?php $max = 500; $online = 251; $percent = round(100/$max*$online); ?> <div style="width:200px;height:30px;border:1px solid #CCC"><div style="background:green;height:30px;width:<?php echo $percent ?>%"></div></div> Server load: <?php echo $percent; ?>%. -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
then i suggest firstly learn Windows basics. how create/edit file/folder, how open file, copy/paste and etc. -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
so copy paste is hard for newbie? -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
what version frozen u use? im using 1118 and it support both. python and java. or have you tried??? -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
just create file in data/scripts/quests/PartyDrop/PartyDrop. java and add “data/scripts/quests/PartyDrop/PartyDrop. java“ to data/scripts.cfg thats all.. -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
its java code not python. -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
Whaaaaaat??? i just adapted it to for frozen. so what wrong with me code? -
Request Someone who can adapt that mod for L2Jfrozen?
wongerlt replied to Lowerz's question in Request Server Development Help [L2J]
package quests.PartyDrop; import java.util.List; import java.util.ArrayList; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.network.serverpackets.PlaySound; public class PartyDrop extends Quest { boolean _canReward = false; private static ArrayList<String> playerIps = new ArrayList<String>(); private static final int[] MOB_LIST = {10506,10507}; private static final int[][] DROP_LIST = {{57,50},{57,80}}; public PartyDrop() { super(-1, "PartyDrop", "quests"); for (int mob : MOB_LIST) addKillId(mob); } @Override public String onKill(L2NpcInstance npc, L2PcInstance player, boolean isPet) { if (player.isInParty()) { List<L2PcInstance> party = player.getParty().getPartyMembers(); for (L2PcInstance member : party) { String pIp = member.getClient().getConnection().getInetAddress().getHostAddress(); if (!playerIps.contains(pIp)) { playerIps.add(pIp); if (member.isInsideRadius(npc, 1000, false, false)) { for (int[] i : DROP_LIST) { member.addItem("Party Drop Rewards.", i[0], i[1], member, true); member.broadcastPacket(new PlaySound("ItemSound.quest_finish")); } } else { member.sendMessage("You are too far to be rewarded."); } } else { member.sendMessage("Already 1 member of your ip have been rewarded, so this character won't be rewarded."); } } playerIps.clear(); } else { for (int[] i : DROP_LIST) { player.addItem("Party Drop Rewards.", i[0], i[1], player, true); player.broadcastPacket(new PlaySound("ItemSound.quest_finish")); } } return null; } public static void main(String[] args) { new PartyDrop(); } } script for frozen. just put to data/scripts/quests/PartyDrop and add script path to scripts.cfg p.s its without any config file, so just edit in script file what mobs u want and what drop u want.. -
Help Duel Snipe/UD bug
wongerlt replied to MiReEn's question in Request Server Development Help [L2J]
what version frozen? show duel.java file -
How do we split strings in java
wongerlt replied to mytuo's question in Request Server Development Help [L2J]
firstly what point? paypal have simple api, why u not use it? -
Help Item Handler Problem
wongerlt replied to ganjaradio's question in Request Server Development Help [L2J]
what pack you using? and show full code. -
Help Connecting website to db
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
better warn who provoke to do that because everything starts with that. -
Help Connecting website to db
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
so create new mysql account. CREATE USER 'USER1'@'%' IDENTIFIED BY 'PASSWORD1'; and grant privileges for this user: GRANT ALL ON *.* TO 'USER1'@'%'; '%' - this mean for all ip address allow connect. you can change it example to your website ip for security. -
Help Connecting website to db
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
mysql and website on same pc? -
Help Add pages to droplist.
wongerlt replied to sotid's question in Request Server Development Help [L2J]
try this maybe it will work: else if (_command.startsWith("DropListNpc")) { private static void showItemsPage(Player activeChar, int page) { final L2Object object = activeChar.getTarget(); int MaxItemsPerPage = 10; int MaxPages = _itemssize / maxItemsPerPage; if (_itemssize > MaxItemsPerPage * MaxPages) MaxPages++; if (page > MaxPages) page = MaxPages; int ItemsStart = MaxItemsPerPage * page; int ItemsEnd = _itemssize(); if (ItemsEnd - ItemsStart > MaxItemsPerPage) ItemsEnd = ItemsStart + MaxItemsPerPage; if (object instanceof L2NpcInstance) { NpcHtmlMessage html = new NpcHtmlMessage(0); StringBuilder html1 = new StringBuilder("<html>"); html1.append("<title>Npc Name: " + object.getName() + "</title>"); html1.append("<body>"); html1.append("<br>"); html1.append("<table cellspacing=2 cellpadding=1 width=\"280\">"); if (((L2NpcInstance) object).getTemplate().getDropData() != null) { int myPage = 1; int i = 0; int shown = 0; boolean hasMore = false; for (L2DropCategory cat : ((L2NpcInstance) object).getTemplate().getDropData()) { if (shown == MaxItemsPerPage) { hasMore = true; break; } for (L2DropData drop : cat.getAllDrops()) { final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId()); if (item == null) continue; if (myPage != page) { i++; if (i == MaxItemsPerPage) { myPage++; i = 0; } continue; } if (shown == MaxItemsPerPage) { hasMore = true; break; } int mind = 0, maxd = 0; String smind = null, smaxd = null; String name = item.getName(); if (cat.isSweep()) { mind = (int) (Config.RATE_DROP_SPOIL * drop.getMinDrop()); maxd = (int) (Config.RATE_DROP_SPOIL * drop.getMaxDrop()); } else if (drop.getItemId() == 57) { mind = 300 * drop.getMinDrop(); maxd = 300 * drop.getMaxDrop(); } else { mind = (int) (Config.RATE_DROP_ITEMS * drop.getMinDrop()); maxd = (int) (Config.RATE_DROP_ITEMS * drop.getMaxDrop()); } if (mind > 999999) { DecimalFormat df = new DecimalFormat("###.#"); smind = df.format(((double) (mind)) / 1000000) + " KK"; smaxd = df.format(((double) (maxd)) / 1000000) + " KK"; } else if (mind > 999) { smind = ((mind / 1000)) + " K"; smaxd = ((maxd / 1000)) + " K"; } else { smind = Integer.toString(mind); smaxd = Integer.toString(maxd); } if (name.startsWith("Common Item - ")) { name = "(CI)" + name.substring(14); } if (name.length() >= 34) { name = name.substring(0, 30) + "..."; } html1.append("<tr>"); html1.append("<td valign=top align=center height=38 width=40><img src=\"" + getIcon(item.getItemId()) + "\" height=32 width=32></td>"); html1.append("<td>"); html1.append("<table cellpadding=0 cellspacing=1 width=237>"); html1.append("<tr>"); html1.append("<td>" + (drop.getChance() >= 10000 ? (double) drop.getChance() / 10000 : drop.getChance() < 10000 ? (double) drop.getChance() / 10000 : "N/A") + "% is " + (drop.isQuestDrop() ? "<font color=\"00b3b3\">[Quest]</font>" : (cat.isSweep() ? "<font color=\"009900\">[Spoil]</font> " : "[Drop]")) + "</td>"); html1.append("</tr>"); html1.append("<tr>"); html1.append("<td>Name: <font color=fff600>" + name + "</font> " + (maxd == 1 ? "[1]" : "[" + smind + " - " + smaxd + "]") + "</td>"); html1.append("</tr>"); html1.append("</table>"); html1.append("</td>"); shown++; } } } for (int x = 0; x < MaxPages; x++) { int pagenr = x + 1; if (page == x) { pages += "<td>Page " + pagenr + "</td>"; } else { pages += "<td>something " + something() + " " + x + "\">Page " + pagenr + "</a></td>"; } } } html1.append("</tr></table>"); html1.append("</body>"); html1.append("</html>"); html.setHtml(html1.toString()); activeChar.sendPacket(html); html1 = null; html = null; } } -
try this member.addItem("Party", itemId , (int) count, player, true);
-
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
you have router? if yes then pm me ur skype i will help u. -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
why u write l2virus .ddns .net? you redirect l2virus.ddns.net to your external ip?? -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
to check server is working for others you can here: https://www.infobyip.com/tcpportchecker.php write external your ip and port 2106 or 7777 -
LF any1 help for this
wongerlt replied to StarLineageServer's topic in Coding Discussions & Requests
it can be wrong image url or something else. send to pm url and i tell u what wrong -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
you can login if change ip to 127.0.0.1 in l2.ini and other l2.ini with external ip for others -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
if server are on your pc you cant login with external ip, only others can login but not you. -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
ServerAddr =l2virus.ddns.net change to ServerAddr =127.0.0.1 -
Help Problem making the server public
wongerlt replied to Guarder's question in Request Server Development Help [L2J]
wtf why u try add l2virus.ddns.net?? show l2.ini from client