Jump to content

^Wyatt

Members
  • Posts

    1,418
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Everything posted by ^Wyatt

  1. // pvp reward if (isInsideZone(ZONE_PVP) || isInsideZone(ZONE_PEACE)) { addItem("Loot", 8732, 1, this, true); sendMessage("You won 1 lifestone for a pvp kill!"); } or // pvp reward if (!isInsideZone(ZONE_PEACE)) { addItem("Loot", 8732, 1, this, true); sendMessage("You won 1 lifestone for a pvp kill!"); } and +L2PcInstance[] players = L2World.getInstance().getAllPlayers().values(new L2PcInstance[0]); +switch(your variable...){ + case 1: + PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd1);} + break; + + case 2: + PlaySound _snd2 = new PlaySound(1, "doublekill", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd2);} + break; + + case 3: + PlaySound _snd3 = new PlaySound(1, "triplekill", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd3);} + break; + + case 4: + PlaySound _snd4 = new PlaySound(1, "megakill", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd4);} + break; + + case 5: + PlaySound _snd5 = new PlaySound(1, "ultrakill", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd5);} + break; + + case 10: + PlaySound _snd10 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd10);} + break; + + case 15: + PlaySound _snd15 = new PlaySound(1, "killingspree", 0, 0, 0, 0, 0); +for(L2PcInstance pl : players){ + pl.sendPacket(_snd15);} + break; + default: + ; + } +
  2. manually...
  3. @janiko Thx, thx dude. Latest work: Q10295_SevenSignsSolinasTomb
  4. @inpetto7 Please, read the first post.
  5. @conf17 Yes, all working.
  6. @Crystalia Thx Crystalia, always a pleasure. Latest work: -added npc followers in Q10293 and Q10294 (not in videos)
  7. @Daedalos Thx mate, for your words and your support to the project. Latest work 9th quest of Seven Signs:
  8. @Godly Thanks dude! I appreciate your words :p Here it's the latest work of today:
  9. General.properties --------------------------------------------------------------------------- # Custom Components # --------------------------------------------------------------------------- # Default: False CustomSpawnlistTable = True # Option to save GM spawn only in the custom table. # Default: False SaveGmSpawnOnCustom = True # Option to delete spawn in alternate table. # Default: False DeleteGmSpawnOnCustom = True # Default: False CustomNpcTable = True # Default: False CustomNpcSkillsTable = True # Default: False CustomArmorSetsTable = True # Default: False CustomTeleportTable = True # Default: False CustomDroplistTable = True # Default: False CustomMerchantTables = True # Default: False CustomNpcBufferTables = True # Default: False CustomSkillsLoad = True # Default: False CustomItemsLoad = True # Default: False CustomMultisellLoad = True
  10. @author Trusted payer, friendly person, fix done.
  11. @Shilen CB: Mainpage: repair, teleport, top fame, top pvp, top pk, gm online, server info's, etc. FavPage: info about special features, HomePage: official homepage info Yes, the imports are 98% original of l2j, we have moved some java files for security reasons an added some more, but most of it are original.
  12. @Godly Yes, done.
  13. @AlexCardyz Enterworld.java + if(activeChar.getPvpKills() >= 100) + { + activeChar.addSkill(SkillTable.getInstance().getInfo(3156, 1)); + } + if (activeChar.getPvpKills() >= 200) + { + activeChar.addSkill(SkillTable.getInstance().getInfo(3157, 1)); + } L2PcInstance.java // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); + if(getPvpKills() >= 100) + { + addSkill(SkillTable.getInstance().getInfo(3156, 1)); + } + if (getPvpKills() >= 200) + { + addSkill(SkillTable.getInstance().getInfo(3157, 1)); + } I think combining both is the best way.
  14. I would suggest you to change the type of the variables: NAME_COLOR_FOR_PVP_A-beep-T1 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForA-beep-t1", "FFB900")).intValue(); for: NAME_COLOR_FOR_PVP_A-beep-T1 = Integer.parseInt(L2JModSettings.getProperty("ColorForA-beep-t1","100"); And you can take Int values from GM/ADM color name in Database, etc... Also u could take item "Color Name" in-game and use to change your title color and then go and look in the Database for the Int value.
  15. @author try to make the area in a common place, like primavel island or whatever... and see if works... coz RB areas usually give problems to do things like that... btw I think freya area in this rev of l2jserver is not implemented yet... but try to do it in another place and check xd
  16. SVN for Vip Customers ready. @Shilen Our project is more than brand new and Nexus from hNoke has been in development for more than a year.... I think he would think we look down on his work. Also I'm not working on an Event Engine to after go to hNoke and ask for his work.
  17. @Tryskell It's right. But I only said what I thought ChaoticZone was referred to... and still thinking that... lets wait for @author answer to see whats up...
  18. @Tryskell ChaoticZone it's how one user of mxc named a custom pvp zone and shared the code.
  19. @Darule I didn't understand you at all, btw today we'll work to put a live test server and to finish the Vip customer's SVN.
  20. @shawshaw Take it easy man, my last post in your thread, leave in peace.
  21. @vampir totally agree with you. @author if anyone buy this kinda codes I think it'll mean that world is getting crazy...
  22. @shawshaw this? :s Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4967) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -613,6 +625,11 @@ /** The Clan Identifier of the L2PcInstance */ private int _clanId; + //Chaotic Zone + private static int[] _x = {11551, 10999, 10401, 9472, 6918, 9780}; + private static int[] _y = {-24264, -23576, -24030, -23369, -23188, -22286}; + private static int[] _z = {-3644, -3651, -3660, -3703, -3653, -3699}; + /** The Clan object of the L2PcInstance */ private L2Clan _clan; @@ -2000,6 +2131,13 @@ ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2); sendPacket(cz); } + else if (isInsideZone(ZONE_CHAOTIC)) + { + if (_lastCompassZone == ExSetCompassZoneCode.CHAOTICZONE) return; + _lastCompassZone = ExSetCompassZoneCode.CHAOTICZONE; + ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.CHAOTICZONE); + sendPacket(cz); + } else if (isInsideZone(ZONE_PVP)) { if (_lastCompassZone == ExSetCompassZoneCode.PVPZONE) return; @@ -5349,6 +5593,36 @@ Announcements.getInstance().announceToAll(msg); } } + if (isInsideZone(ZONE_CHAOTIC)) + { + { + sendMessage("Get ready! You will be revive in 5 seconds!"); + ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() + { + public void run() + { + int r = Rnd.get(3); + teleToLocation(_x[r] , _y[r], _z[r]); + doRevive(); + } + }, 5000); + } + } broadcastStatusUpdate(); // Clear resurrect xp calculation Index: java/com/l2jserver/gameserver/network/serverpackets/Die.java =================================================================== --- java/com/l2jserver/gameserver/network/serverpackets/Die.java (revision 4967) +++ java/com/l2jserver/gameserver/network/serverpackets/Die.java (working copy) @@ -62,10 +63,13 @@ } _charObjId = cha.getObjectId(); _canTeleport = !((cha instanceof L2PcInstance && TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(_charObjId)) || cha.isPendingRevive()); if (cha instanceof L2Attackable) _sweepable = ((L2Attackable)cha).isSweepActive(); + if(cha instanceof L2PcInstance && ((L2PcInstance)cha).getWorldRegion().containsZone(42490)) + _canTeleport = false; + } Index: java/com/l2jserver/gameserver/network/SystemMessageId.java =================================================================== --- java/com/l2jserver/gameserver/network/SystemMessageId.java (revision 4967) +++ java/com/l2jserver/gameserver/network/SystemMessageId.java (working copy) @@ -14693,6 +14693,25 @@ public static final SystemMessageId THOMAS_D_TURKEY_DISAPPEARED; /** + * ID: 6510<br> + * Message: Chaotic Zone + */ + public static final SystemMessageId CHAOTIC_ZONE; + + + /** * Array containing all SystemMessageIds<br> * Important: Always initialize with a length of the highest SystemMessageId + 1!!! */ @@ -17116,7 +17135,9 @@ THOMAS_D_TURKEY_APPEARED = new SystemMessageId(6503); THOMAS_D_TURKEY_DEFETED = new SystemMessageId(6504); THOMAS_D_TURKEY_DISAPPEARED = new SystemMessageId(6505); - + CHAOTIC_ZONE = new SystemMessageId(6510); buildFastLookupTable(); } Index: java/com/l2jserver/gameserver/network/serverpackets/ExSetCompassZoneCode.java =================================================================== --- java/com/l2jserver/gameserver/network/serverpackets/ExSetCompassZoneCode.java (revision 4967) +++ java/com/l2jserver/gameserver/network/serverpackets/ExSetCompassZoneCode.java (working copy) @@ -23,12 +23,13 @@ private static final String _S__FE_32_EXSETCOMPASSZONECODE = "[s] FE:33 ExSetCompassZoneCode"; public static final int ALTEREDZONE = 0x08; public static final int SIEGEWARZONE1 = 0x0A; public static final int SIEGEWARZONE2 = 0x0B; public static final int PEACEZONE = 0x0C; public static final int SEVENSIGNSZONE = 0x0D; public static final int PVPZONE = 0x0E; public static final int GENERALZONE = 0x0F; + public static final int CHAOTICZONE = 0x09; private int _zoneType; Index: java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java =================================================================== --- java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java (revision 0) +++ java/com/l2jserver/gameserver/model/zone/type/L2ChaoticZone.java (revision 0) @@ -0,0 +1,82 @@ +/* + * 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.l2jserver.gameserver.model.zone.type; + +import com.l2jserver.gameserver.datatables.SkillTable; +import com.l2jserver.gameserver.model.actor.L2Character; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.zone.L2SpawnZone; + + +/** + * Diffrent Version of Chaotic Zone + * + * @author Jeff + */ +public class L2ChaoticZone extends L2SpawnZone +{ + public L2ChaoticZone(int id) + { + super(42490); + } + + @Override + protected void onEnter(L2Character character) + { + character.setInsideZone(L2Character.ZONE_CHAOTIC, true); + character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, true); + character.setInsideZone(L2Character.ZONE_NOSTORE, true); + character.setInsideZone(L2Character.ZONE_NOBOOKMARK, true); + character.setInsideZone(L2Character.ZONE_NOITEMDROP, true); + + if (character instanceof L2PcInstance) + { + ((L2PcInstance) character).setPvpFlag(1); + ((L2PcInstance) character).sendMessage("You entered a Chaotic Zone"); + ((L2PcInstance) character).broadcastUserInfo(); + } + } + + @Override + protected void onExit(L2Character character) + { + character.setInsideZone(L2Character.ZONE_CHAOTIC, false); + character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, false); + character.setInsideZone(L2Character.ZONE_NOSTORE, false); + character.setInsideZone(L2Character.ZONE_NOBOOKMARK, false); + character.setInsideZone(L2Character.ZONE_NOITEMDROP, false); + + if (character instanceof L2PcInstance) + { + ((L2PcInstance) character).sendMessage("You left a Chaotic Zone"); + ((L2PcInstance) character).setPvpFlag(0); + ((L2PcInstance) character).broadcastUserInfo(); + } + } + + @Override + public void onDieInside(L2Character character) + { + if (character instanceof L2PcInstance) + { + } + } + + @Override + public void onReviveInside(L2Character character) + { + SkillTable.getInstance().getInfo(1323, 1).getEffects(character, character); + } +} \ No newline at end of file Index: java/com/l2jserver/gameserver/network/clientpackets/Logout.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/Logout.java (revision 4967) +++ java/com/l2jserver/gameserver/network/clientpackets/Logout.java (working copy) @@ -83,6 +85,14 @@ return; } + //Chaotic Zone + if (player.isInsideZone(player.ZONE_CHAOTIC)) + { + player.sendMessage("You cannot log out while you are inside Chaotic Zone."); + sendPacket(RestartResponse.valueOf(false)); + return; + } + // Prevent player from logging out if they are a festival participant // and it is in progress, otherwise notify party members that the player // is not longer a participant. Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (revision 4967) +++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java (working copy) @@ -87,6 +88,15 @@ return; } + //Chaotic Zone + if (player.isInsideZone(player.ZONE_CHAOTIC)) + { + player.sendMessage("You cannot restart while you are inside Chaotic Zone."); + sendPacket(RestartResponse.valueOf(false)); + return; + } + + // Prevent player from restarting if they are a festival participant // and it is in progress, otherwise notify party members that the player // is not longer a participant. Index: java/com/l2jserver/gameserver/model/actor/L2Character.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 4967) +++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy) @@ -205,8 +205,10 @@ public static final byte ZONE_ALTERED = 19; public static final byte ZONE_NOBOOKMARK = 20; public static final byte ZONE_NOITEMDROP = 21; + public static final byte ZONE_CHAOTIC = 22; - private final byte[] _zones = new byte[22]; + private final byte[] _zones = new byte[23]; Index: dist/game/data/scripts/handlers/voicedcommandhandlers/Home.java =================================================================== --- dist/game/data/scripts/handlers/voicedcommandhandlers/Home.java (revision 0) +++ dist/game/data/scripts/handlers/voicedcommandhandlers/Home.java (revision 0) @@ -0,0 +1,106 @@ +/* + * 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 handlers.voicedcommandhandlers; + +import com.l2jserver.Config; +import com.l2jserver.gameserver.datatables.MapRegionTable; +import com.l2jserver.gameserver.handler.IVoicedCommandHandler; +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.serverpackets.ActionFailed; +import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager; + + +/** + * ===Jeff=== + * + */ +public class Home implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = { "home" }; + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.equalsIgnoreCase("home")) + { + if(activeChar.isDead()) + { + activeChar.sendMessage("You cannot use this feature if you're dead."); + return false; + } + if(activeChar.isInOlympiadMode()) + { + activeChar.sendMessage("You cannot use this feature during olympiad."); + return false; + } + if(activeChar.isInJail()) + { + activeChar.sendMessage("You cannot use this command while you are in Jail."); + return false; + } + if(activeChar.isInDuel()) + { + activeChar.sendMessage("You cannot use this feature during Duel."); + return false; + } + if(activeChar.isFestivalParticipant()) + { + activeChar.sendMessage("You cannot use this feature during a Festival."); + return false; + } + if(activeChar.inObserverMode()) + { + activeChar.sendMessage("You cannot use this feature during Observer Mode."); + return false; + } + if(activeChar.getInventory().getItemByItemId(57) == null) + { + activeChar.sendMessage("You don't have enough adena to use command .home"); + return false; + } + if(AttackStanceTaskManager.getInstance().getAttackStanceTask(activeChar) && !(activeChar.isGM() && Config.GM_RESTART_FIGHTING)) + { + if (Config.DEBUG) _log.fine("Player " + activeChar.getName() + " tried to logout while fighting inside chaotic zone"); + + activeChar.sendMessage("You cannot go home while fighting!"); + activeChar.sendPacket(ActionFailed.STATIC_PACKET); + return false; + } + if(activeChar instanceof L2PcInstance && ((L2PcInstance)activeChar).getWorldRegion().containsZone(42490)) + { + activeChar.sendMessage("You will be send to nearest town!"); + activeChar.getInventory().destroyItemByItemId("root", 57, 500, activeChar, activeChar.getTarget()); + activeChar.broadcastUserInfo(); + Location loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town); + activeChar.setInstanceId(0); + activeChar.teleToLocation(loc, true); + activeChar.doRevive(); + } + else + { + activeChar.sendMessage("Command .home can only be used inside Chaotic Zone"); + } + } + return true; + } + public static int teleToLocation() + { + return teleToLocation(); + } + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } + +} \ No newline at end of file Index: dist/game/data/scripts/handlers/MasterHandler.java =================================================================== --- dist/game/data/scripts/handlers/MasterHandler.java (revision 8427) +++ dist/game/data/scripts/handlers/MasterHandler.java (working copy) @@ -240,12 +251,20 @@ import handlers.voicedcommandhandlers.TvTVoicedInfo; +import handlers.voicedcommandhandlers.Home; import handlers.voicedcommandhandlers.Wedding; import handlers.voicedcommandhandlers.stats; import java.util.logging.Logger; @@ -535,7 +565,16 @@ private static void loadVoicedHandlers() { VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats()); + VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Home()); if (Config.L2JMOD_ALLOW_WEDDING) VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Wedding()); if (Config.BANKING_SYSTEM_ENABLED) shared on mxc :s
  23. @Shilen Based on L2jserver, it's specified in the forum.
  24. I'm glad to announce that Vip Customers will have SVN access in few days. Also the prices are changed. Prices: 20 euros - Customer, will get 1 month of compiled packs with free support and updates. 65 euros - Vip Customer, will get 4 month(s) of SVN access and free support. Since you buy any compiled pack, it will work lifetime, with your IP.
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..