L2JMobius

Recent Posts

11
General Discussion / Classic Saviors Customs
« Last post by SkayaanBlaze on April 19, 2024, 03:15:05 PM »
Hello,i see  code for custom drop event,but i dont know how is work.

Code: [Select]
Index: dist/game/data/scripts/events/CustomDropEvent/CustomDropEvent.java
===================================================================
--- dist/game/data/scripts/events/CustomDropEvent/CustomDropEvent.java (nonexistent)
+++ dist/game/data/scripts/events/CustomDropEvent/CustomDropEvent.java (working copy)
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * 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 events.CustomDropEvent;
+
+import org.l2jmobius.gameserver.model.quest.LongTimeEvent;
+
+/**
+ * @author Mobius
+ */
+public class CustomDropEvent extends LongTimeEvent
+{
+ public static void main(String[] args)
+ {
+ new CustomDropEvent();
+ }
+}
Index: dist/game/data/scripts/events/CustomDropEvent/config.xml
===================================================================
--- dist/game/data/scripts/events/CustomDropEvent/config.xml (nonexistent)
+++ dist/game/data/scripts/events/CustomDropEvent/config.xml (working copy)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<event name="Custom Drop Event" active="19 11 2019-19 11 2020" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
+ <droplist>
+ <add item="6392" min="1" max="1" chance="5%" minLevel="85" /> <!-- Event - Medal -->
+ <add item="6392" min="2" max="3" chance="50%" minLevel="100" maxLevel="120" /> <!-- Event - Medal -->
+ <add item="6393" min="3" max="5" chance="100%" monsterIds="10001,10002,10003,10004" /> <!-- Event - Glittering Medal -->
+ </droplist>
+</event>
\ No newline at end of file
Your code.

and i make a 2 files one CustomDropEvent.java one config.xml in folder /scripts/events/CustomDropEvent/

This is my .xml - config file
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
+<event name="Custom Drop Event" active="19 11 2019-19 11 2020" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
+ <droplist>
+ <add item="6392" min="1" max="1" chance="5%" minLevel="85" /> <!-- Event - Medal -->
+ <add item="6392" min="2" max="3" chance="50%" minLevel="100" maxLevel="120" /> <!-- Event - Medal -->
+ <add item="6393" min="3" max="5" chance="100%" monsterIds="10001,10002,10003,10004" /> <!-- Event - Glittering Medal -->
+ </droplist>
+</event>
  without + symbols

This is my .jave file without + symbols

Code: [Select]
/**
+ * @author Mobius
+ */
+public class CustomDropEvent extends LongTimeEvent
+{
+ public static void main(String[] args)
+ {
+ new CustomDropEvent();
+ }
+}


and i make a custom drop wqith item number 955 from monster 20072(Basilisk) ,but nothing happening.





12
General Discussion / Re: pvp_pk title
« Last post by CostyKiller on April 19, 2024, 12:45:43 PM »
That setting I told you to check should work in realtime, I told you to check it because it sends some packets for that realtime you want to work... and you can use it on your code.
13
General Discussion / Re: pvp_pk title
« Last post by dramaa on April 19, 2024, 12:33:00 PM »
We already have such function for titles, check this line in player.java

Code: [Select]
public void updatePvpTitleAndColor(boolean broadcastInfo)

i am not pro but, what i see, seems like giving titles when reaching certain amount of pvp, and i want [pvp][pk] title all the time :/ changes i made showing pvp-pk  but, not in real time, it's need to be restarted to show real numbers after pvp
14
General Discussion / Re: pvp_pk title
« Last post by CostyKiller on April 19, 2024, 01:50:58 AM »
We already have such function for titles, check this line in player.java

Code: [Select]
public void updatePvpTitleAndColor(boolean broadcastInfo)
15
General Discussion / CT0 pvp_pk title
« Last post by dramaa on April 18, 2024, 01:20:28 PM »
so i added pvp pk title and its working except for updating it in real time, i mean when i am getting pvp or pk and i restart, i am getting correct title but, not working in real time, help me if you can.

Player.java
Code: [Select]
/**
* Update title.
*/
public void updateTitle()
{
setTitle(Config.PVP_TITLE_PREFIX + "[" + getPvpKills() + "]" + Config.PK_TITLE_PREFIX + "[" + getPkKills() + "]");
}
Code: [Select]
if (Config.PVP_PK_TITLE)
{
updateTitle();
}
Config.java

Code: [Select]
public static boolean PVP_PK_TITLE;

public static String PVP_TITLE_PREFIX;
public static String PK_TITLE_PREFIX;
16
General Discussion / Re: Shops not available to players only GM
« Last post by Balkonas on April 17, 2024, 10:00:34 PM »
well thank you sir, that worked..
17
General Discussion / Re: Shops not available to players only GM
« Last post by skaki on April 17, 2024, 09:48:36 PM »
Add NPC id in multisell xml file.
18
General Discussion / Shops not available to players only GM
« Last post by Balkonas on April 17, 2024, 09:17:35 PM »
Hello,

I've come up with this issue and I have no idea why is this happening? Apparently only GM'S can access shops? anyone else had this happen before?

"Multisell 1 is restricted. Under current conditions cannot be used. Only GMs are allowed to use it".
19
Bug Reports / Re: Fixed Quest : Q11027_PathOfDestinyOvercome
« Last post by expini on April 17, 2024, 04:32:35 PM »
private static boolean INSTANT_LEVEL_
You mean need add this line to all quest right

i mean when create new character lv 1 and teleport to monster some where when kill not get EXP
or where i put this line?
20
Marketplace / Re: Interface Essence High Elf 464
« Last post by MacuK on April 17, 2024, 04:18:07 PM »
Missions that cannot be purchased are displayed as not available for purchase


Available, button active