-
Posts
1,418 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by ^Wyatt
-
lmao Are you serious? xD
-
Try this... /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.model.actor.instance; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.Collection; import java.util.NoSuchElementException; import java.util.StringTokenizer; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.templates.L2NpcTemplate; import javolution.text.TextBuilder; /** * @author Autos! 1-0 * */ public class L2PscDonateInstance extends L2FolkInstance { public L2PscDonateInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(final L2PcInstance player, String command) { if(player == null) { return; } if(command.startsWith("dlist")) { info(player); } if(command.startsWith("donate")) { StringTokenizer st = new StringTokenizer(command); st.nextToken(); String quantity = null; int pin1 = 0; int pin2 = 0; int pin3 = 0; int pin4 = 0; String message = ""; quantity = st.nextToken(); try { pin1 = Integer.parseInt(st.nextToken()); pin2 = Integer.parseInt(st.nextToken()); pin3 = Integer.parseInt(st.nextToken()); pin4 = Integer.parseInt(st.nextToken()); } catch(NumberFormatException enf) { player.sendMessage("Enter a valid pin."); return; } catch(NoSuchElementException enf) { player.sendMessage("Enter a valid pin."); return; } try { while(st.hasMoreTokens()) message = message + st.nextToken() + " "; String fname = "data/donates/"+player.getName()+".txt"; File file = new File(fname); boolean exist = file.createNewFile(); if(!exist) { player.sendMessage("You have already sent a donation , GMs must check it first"); return; } FileWriter fstream = new FileWriter(fname); BufferedWriter out = new BufferedWriter(fstream); out.write("Character Info: [Character: "+ player.getName() +"["+ player.getObjectId()+"] - Account: "+ player.getAccountName()+" - IP: "+player.getClient().getConnection().getInetAddress().getHostAddress()+"]\nMessage : donate "+ quantity +" "+ message + " "+ pin1+ " "+ pin2+ " "+ pin3+ " "+ pin4); out.close(); player.sendMessage("Donation sent. GMs will check it soon. Thanks..."); Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); for (L2PcInstance gms : pls) { if(gms.isGM()) gms.sendMessage(player.getName() +" sent a donation."); } } catch(Exception e) { e.printStackTrace(); } } } @Override public void onAction(L2PcInstance player) { if (!canTarget(player)) { return; } showHtmlWindow(player); } private void showHtmlWindow(L2PcInstance activeChar) { TextBuilder tb = new TextBuilder(); NpcHtmlMessage html = new NpcHtmlMessage(1); tb.append("<html><head><title>Donation Manager</title></head><body><center><table width=\"250\" bgcolor=\"000000\"><tr><td align=center><font color=\"6fd3d1\">Easy Donation With Paysafe Card</font></td></tr></table>_______________________________________<br><br><table width=\"250\"><tr><td><font color=\"ddc16d\">Select Donation quantity:</font></td><td><combobox width=80 height=17 var=quantity list=10-Euro;25-Euro;50-Euro;100-Euro;></td></tr></table><br><br><font color=\"ddc16d\">Paysafe Card Pin:</font><table width=\"250\"><tr><td><edit var=\"pin1\" width=50 height=12 type=number></td><td><edit var=\"pin2\" width=50 height=12 type=number></td><td><edit var=\"pin3\" width=50 height=12 type=number></td><td><edit var=\"pin4\" width=50 height=12 type=number></td></table><br><br><multiedit var=\"message\" width=240 height=40><br><br><button value=\"Donate!\" action=\"bypass -h npc_"+getObjectId()+"_donate $quantity $pin1 $pin2 $pin3 $pin4 $message\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><button value=\"Donation List\" action=\"bypass -h npc_"+getObjectId()+"_dlist\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><font color=\"a1df64\">Created by KnipeX (if he says so, huh)</font></center></body></html>"); html.setHtml(tb.toString()); activeChar.sendPacket(html); } private void info(L2PcInstance activeChar) { TextBuilder tb = new TextBuilder(); NpcHtmlMessage html = new NpcHtmlMessage(1); tb.append("<html><head><title>Donation Manager</title></head><body><center>Info goes here</center></body></html>"); html.setHtml(tb.toString()); activeChar.sendPacket(html); } }
-
Dirty way: L2Character-> public void reduceCurrentHp(double i, L2Character attacker, boolean awake, boolean isDOT, L2Skill skill) get the weapon that is using the attacker, if is a monster weapon, proceed then check if 'this' is a player and if attacker is a player, then i = 0
-
Did you, at least, check this coords?...
-
You must add null checkers and also Integer checkers... it's missing.
-
[Share]Get Class Items With Commands.
^Wyatt replied to 'Baggos''s topic in Server Shares & Files [L2J]
Why? You create a list and then you use loops. In this way if you have to modify and add another item you will only have to write ", 14720" in the list, for example. -
Did you create the directory game/data/donations ?
-
Can not resolve hostname
^Wyatt replied to klara's question in Request Server Development Help [L2J]
Didn't see it :) I never spam without a reason so take care about what u say. Do them use the same system as yours? It's strange coz this kinda error I think only appears when .ini or no-ip are not set properly. -
Can not resolve hostname
^Wyatt replied to klara's question in Request Server Development Help [L2J]
you must put "localhost" in your .ini since you're trying to log with the PC where the server is. -
omg... /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.model.actor.instance; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.Collection; import java.util.StringTokenizer; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.templates.L2NpcTemplate; import javolution.text.TextBuilder; /** * @author Autos! 1-0 * */ public class L2PscDonateInstance extends L2FolkInstance { public L2PscDonateInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(final L2PcInstance player, String command) { if(player == null) { return; } if(command.startsWith("dlist")) { info(player); } if(command.startsWith("donate")) { StringTokenizer st = new StringTokenizer(command); st.nextToken(); String quantity = null; int pin1 = 0; int pin2 = 0; int pin3 = 0; int pin4 = 0; String message = ""; try { quantity = st.nextToken(); pin1 = Integer.parseInt(st.nextToken()); pin2 = Integer.parseInt(st.nextToken()); pin3 = Integer.parseInt(st.nextToken()); pin4 = Integer.parseInt(st.nextToken()); while(st.hasMoreTokens()) message = message + st.nextToken() + " "; String fname = "data/donates_"+player.getName()+".txt"; File file = new File(fname); boolean exist = file.createNewFile(); if(!exist) { player.sendMessage("You have already sent a donation , GMs must check it first"); return; } FileWriter fstream = new FileWriter(fname); BufferedWriter out = new BufferedWriter(fstream); out.write("Character Info: [Character: "+ player.getName() +"["+ player.getObjectId()+"] - Account: "+ player.getAccountName()+" - IP: "+player.getClient().getConnection().getInetAddress().getHostAddress()+"]\nMessage : donate "+ quantity +" "+ message + " "+ pin1+ " "+ pin2+ " "+ pin3+ " "+ pin4); out.close(); player.sendMessage("Donation sent. GMs will check it soon. Thanks..."); Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); for (L2PcInstance gms : pls) { if(gms.isGM()) gms.sendMessage(player.getName() +" sent a donation."); } } catch(Exception e) { e.printStackTrace(); } } } @Override public void onAction(L2PcInstance player) { if (!canTarget(player)) { return; } showHtmlWindow(player); } private void showHtmlWindow(L2PcInstance activeChar) { TextBuilder tb = new TextBuilder(); NpcHtmlMessage html = new NpcHtmlMessage(1); tb.append("<html><head><title>Donation Manager</title></head><body><center><table width=\"250\" bgcolor=\"000000\"><tr><td align=center><font color=\"6fd3d1\">Easy Donation With Paysafe Card</font></td></tr></table>_______________________________________<br><br><table width=\"250\"><tr><td><font color=\"ddc16d\">Select Donation quantity:</font></td><td><combobox width=80 height=17 var=quantity list=10-Euro;25-Euro;50-Euro;100-Euro;></td></tr></table><br><br><font color=\"ddc16d\">Paysafe Card Pin:</font><table width=\"250\"><tr><td><edit var=\"pin1\" width=50 height=12 type=number></td><td><edit var=\"pin2\" width=50 height=12 type=number></td><td><edit var=\"pin3\" width=50 height=12 type=number></td><td><edit var=\"pin4\" width=50 height=12 type=number></td></table><br><br><multiedit var=\"message\" width=240 height=40><br><br><button value=\"Donate!\" action=\"bypass -h npc_"+getObjectId()+"_donate $quantity $pin1 $pin2 $pin3 $pin4 $message\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><button value=\"Donation List\" action=\"bypass -h npc_"+getObjectId()+"_dlist\" width=95 height=21 back=\"bigbutton_over\" fore=\"bigbutton\"><br><font color=\"a1df64\">Created by KnipeX (if he says so, huh)</font></center></body></html>"); html.setHtml(tb.toString()); activeChar.sendPacket(html); } private void info(L2PcInstance activeChar) { TextBuilder tb = new TextBuilder(); NpcHtmlMessage html = new NpcHtmlMessage(1); tb.append("<html><head><title>Donation Manager</title></head><body><center>Info goes here</center></body></html>"); html.setHtml(tb.toString()); activeChar.sendPacket(html); } }
-
About help in Translation
^Wyatt replied to Stalone's question in Request Server Development Help [L2J]
Yes. -
About help in Translation
^Wyatt replied to Stalone's question in Request Server Development Help [L2J]
Cómo conectar (servers name) Guía Para conectar a nuestro servidor solo necesita dos cosas: El cliente de Lineage II High Five y nuestro system. (Las descargas están situadas al final de la página.) Lo que tiene que hacer es : Instalar el cliente de Lineage 2 High Five Descargar y extraer nuestro system Poner el system en la carpeta del cliente de Lineage II High Five (Normalmente dicha carpeta se encuentra en C:/Program Files/Lineage II/ ) Descargas Descarga L2 (server name) System Descarga cliente de Lineage II High Five -
Are u kidding right? x'D There isn't any scam. Is he maybe doing bad or/and hasn't he word?... maybe... but, scam? oh please...
-
They paid for a code not for lifetime update privileges. And they usually tries to resell it so, why to give them updates since they didn't hire him? They only paid for a freaking code... I think I cannot see any "code" in marketplace that provide new version updates for free. The only support that he should give is bug-support. My opinion.
-
All you can say against him is that he maybe didn't keep his word. Something that isn't "illegal". And viewing the % of leaks nowadays... I think he's doing well.
-
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Solved, thread can be locked. -
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 403) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -13504,6 +13504,8 @@ // start the countdown _punishTask = ThreadPoolManager.getInstance().scheduleGeneral(new PunishTask(), _punishTimer); sendMessage("You are in jail for "+delayInMinutes+" minutes."); + if(getKarma() !=0) + setKarma(0); }
-
I suggest you to take off this code right now from your server x'D A code that what only does is sending players to jail when pk... that can be done with 2 lines in L2PcInstance... is on your code a task that is executed every 3 seconds and checks all players online... lolmao... free lag
-
[Info]Peronal Reputation Points(Fame,PvP Items)
^Wyatt replied to Reptant_'s topic in General Discussion [English]
Isn't it a custom from Feagurth? -
Ye sorry I'm so much blind on mornings forget all I said xd
-
So... you'll go to lvl20 zone :/ edit:i'm blind
-
If you're lvl 75+ you'll go to lvl20 area. Reverse the if's order. edit:i'm blind
-
Anyone is hating you, just read what people posted. Ty for the explanation :)
-
Is anyone confused as me? xd

