Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P l2j-lisvus-main
- diff --git gameserver\data\scripts\ai\individual\BossCustomNoblesLastHist.java -- local onde criar arquivo
- new file mode 100644
- index 0000000..06df9c6
- --- /dev/null
- +++ gameserver\data\scripts\ai\individual\BossCustomNoblesLastHist.java -- Local da pasta gameserver
- @@ -0,0 +1,60 @@
- +package ai.individual;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.model.quest.Quest;
- +import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
- +
- +/**
- + *
- + * @author S.Christian
- + *
- + */
- +
- +public class BossCustomNoblesLastHist extends Quest
- +{
- + public BossCustomNoblesLastHist()
- + {
- + super(-1, "BossCustomNoblesLastHist", "ai");
- +
- + addKillId(Config.BOSS_CUSTOM_NOBLES_ID);
- + }
- + public static void main(String[] args)
- + {
- + // Quest class
- + new BossCustomNoblesLastHist();
- + }
- + @Override
- + public String onKill(L2NpcInstance npc, L2PcInstance player, boolean isPet)
- + {
- + if (player.getParty() != null)
- + {
- + for (L2PcInstance members : player.getParty().getPartyMembers())
- + {
- +
- + if (!members.isInsideRadius(npc, Config.DISTANCE_FOR_RENEWAL_NOBLES_PARTY, false, false))
- + {
- + members.sendMessage("You were too far away from Event Boss. You've missed the chance of becoming Noblesse!");
- + continue;
- + }
- + if(members.isDead() || members.isNoble())
- + {
- + members.sendMessage("You can't is Action.");
- + continue;
- + }
- + if(Config.ENABLE_RAIDBOSS_NOBLES)
- + if (!members.isNoble())
- + {
- + members.setNoble(true);
- + members.getInventory().addItem("Noblesse Tiara", 7694, 1, members, null);
- + members.broadcastPacket(new SocialAction(members.getObjectId(), 16));
- + members.sendMessage("Congratulations! All party members have obtained Noblesse Status");
- + }
- + }
- + }
- +
- + return null;
- + }
- +
- +}
- \ No newline at end of file
- diff --git java/config/Custom.properties java
- index ac00dc7..5c921f0 100644
- --- java/config/Custom.properties
- +++ java/config/Custom.properties
- @@ -331,7 +331,20 @@
- OfflineDisconnectFinished = True
- # If set to True, name color will be changed when entering offline mode
- OfflineSetNameColor = False
- # Color of the name in offline mode (if OfflineSetNameColor = True)
- OfflineNameColor = 808080
- +
- +#================================================
- +# BossEvent Nobles
- +#================================================
- +#Enable Status nobles for kill boss?
- +EnableBossEventLastHit = True
- +
- +#ID RAIDBOSS EVENT LAST HIST
- +BossLastHitID = 10325
- +
- +#Distance renewal status nobles for party
- +BossLastHitDistance = 2000
- +
- diff --git java/net/sf/l2j/Config.java
- index 88ec0a3..6ff54ca 100644
- --- java/net/sf/l2j/Config.java
- +++ java/net/sf/l2j/Config.java
- @@ -116,12 +116,16 @@
- /** Number of seconds the IP ban will last, default 10 minutes */
- public static int LOGIN_BLOCK_AFTER_BAN;
- /** Hostname of the Game Server */
- public static String GAMESERVER_HOSTNAME;
- + public static boolean ENABLE_RAIDBOSS_NOBLES;
- + public static int BOSS_CUSTOM_NOBLES_ID;
- + public static int DISTANCE_FOR_RENEWAL_NOBLES_PARTY;
- +
- // Access to database
- /** Driver to access to database */
- public static String DATABASE_DRIVER;
- /** Path to access to database */
- public static String DATABASE_URL;
- /** Database login */
- @@ -1962,12 +1966,16 @@
- catch (Exception e)
- {
- e.printStackTrace();
- throw new Error("Failed to Load " + CUSTOM_FILE + " File.");
- }
- + BOSS_CUSTOM_NOBLES_ID = Integer.parseInt(customSettings.getProperty("BossLastHitID", "1"));
- + DISTANCE_FOR_RENEWAL_NOBLES_PARTY = Integer.parseInt(customSettings.getProperty("BossLastHitDistance", "1"));
- + ENABLE_RAIDBOSS_NOBLES = Boolean.parseBoolean(customSettings.getProperty("EnableBossEventLastHit", "true"));
- +
- ANTIBUFF_SHIELD_ENABLE = Boolean.valueOf(customSettings.getProperty("AntibuffShieldEnable", "false"));
- SKILL_REUSE_INDEPENDENT = Boolean.valueOf(customSettings.getProperty("SkillReuseIndependent", "false"));
- PASSWORD_CHANGE_ENABLE = Boolean.valueOf(customSettings.getProperty("PasswordChangeEnable", "false"));
- CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(customSettings.getProperty("CustomSpawnlistTable", "false"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement