Hey can someone fix for me this code .. i use L2JFrozen latest version
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/VipItem.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/VipItem.java (working copy)
@@ -0,0 +1,145 @@
+/*
+ * 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.handler.itemhandlers;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IItemHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jfrozen.util.CloseUtil;
+import com.l2jfrozen.util.database.L2DatabaseFactory;
+
+/**
+ * @author Crystalia
+ *
+ */
+public class VipItem implements IItemHandler
+{
+
+ private static final int ITEM_IDS[] = {
+ 6673
+ };
+
+ @Override
+ public int[] getItemIds()
+ {
+ return ITEM_IDS;
+ }
+
+ private void updateDatabase(L2PcInstance player, boolean newDonator)
+ {
+ Connection con = null;
+ try
+ {
+ // prevents any NPE.
+ // ----------------
+ if(player == null)
+ return;
+
+ // Database Connection
+ //--------------------------------
+ con = L2DatabaseFactory.getInstance().getConnection(false);
+ PreparedStatement stmt = con.prepareStatement(newDonator ? INSERT_DATA : DEL_DATA);
+
+ // if it is a new donator insert proper data
+ // --------------------------------------------
+ if(newDonator)
+ {
+ stmt.setInt(1, player.getObjectId());
+ stmt.setString(2, player.getName());
+ stmt.setInt(3, player.isHero() ? 1 : 0);
+ stmt.setInt(4, player.isNoble() ? 1 : 0);
+ stmt.setInt(5, 1);
+ stmt.execute();
+ stmt.close();
+ stmt = null;
+ }
+ else
+ // deletes from database
+ {
+ stmt.setInt(1, player.getObjectId());
+ stmt.execute();
+ stmt.close();
+ stmt = null;
+ }
+ }
+ catch(Exception e)
+ {
+ if(Config.ENABLE_ALL_EXCEPTIONS)
+ e.printStackTrace();
+
+
+ }
+ finally
+ {
+ CloseUtil.close(con);
+ }
+ }
+
+ // Updates That Will be Executed by MySQL
+ // ----------------------------------------
+ String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)";
+ String DEL_DATA = "UPDATE characters_custom_data SET donator = 0 WHERE obj_Id=?";
+
+ @Override
+ public void useItem(L2PlayableInstance playable, L2ItemInstance item)
+ {
+ if(!(playable instanceof L2PcInstance))
+ return;
+ L2PcInstance activeChar = (L2PcInstance)playable;
+
+ if(activeChar.isDonator())
+ {
+ activeChar.sendMessage("You are already a donator.You cannot use that item.");
+ return;
+ playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
+ activeChar.setDonator(true);
+ updateDatabase(activeChar, true);
+ activeChar.sendMessage("Thanks for using our item in order to be server's donator.");
+ activeChar.broadcastUserInfo();
+
+
+ }
+
+}
\ No newline at end of file
Problem is :
[javac] C:\Users\George\workspace\trunk\gameserver\head-src\com\l2jfrozen\gameserver\handler\itemhandlers\VipItem.java:119: error: reached end of file while parsing
[javac] }
[javac] ^
[javac] 1 error
Hello. You may encounter the Push item fail error when trying to pick up an item dropped on the ground by a mob.
or
You can throw something out of your inventory and pick it up again, several times.
Probably this is a quantum dependency) I don't understand at what point this happens, sometimes two items one after another experience push item errors, and sometimes I don't have enough thousands of attempts to repeat this trick)
In any case, this is just a visual error and after the relog, the item appears in the inventory. I think first i need to disconnect the extender and check it on a bare server. I still need time to check this, maybe it's not even about the autoloot function.
https://youtu.be/6mcfmdImofE
-----------
In general, I would like to thank our wonderful Emca Eressea for her deep knowledge in programming and reverse engineering. And for the fact that her work is open to everyone, this is very amazing, and incredibly valuable.
ADENA
500 K = 40e
1kk = 70e
3kk = 190e
ITEMS
staff of life = 150e
karmian set = 90e
elven jewls top D = 30e
Orcish Poleaxe+1 best C pole = 680e
any D grade armor on demand
discord
wiz0642_81242
Question
SQL Developer
Hey can someone fix for me this code .. i use L2JFrozen latest version
Problem is :
7 answers to this question
Recommended Posts