Jump to content

StarSCreams

Members
  • Posts

    223
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by StarSCreams

  1. if I add this type of configuration, there is currently setup for "autolootraidboss" and "general autoloot"and I want to add "autoloot adena" if you can help me I appreciate matim :D
  2. hi all, I just want a little help in this mod, I have a code but I have worked I think is wrong, I incorporate into my project on: autolootadena for the adena dropping on the floor and other items not autoloot item in order all exept adena. this code does not work for me I have to l2jserver freya @@ -1402,7 +1402,8 @@ // Check if the autoLoot mode is active if (isFlying() || (!isRaid() && Config.AUTO_LOOT) - || (isRaid() && Config.AUTO_LOOT_RAIDS)) + || (isRaid() && Config.AUTO_LOOT_RAIDS) + || (Config.AUTO_LOOT_ADENA && item.getItemId() == 57)) player.doAutoLoot(this, item); // Give the item(s) to the L2PcInstance that has killed the L2Attackable else dropItem(player, item); // drop the item on the ground any solution? thanks sorry my bad english :-\
  3. with l2jserver, I can not see the diff of the updates I get the following error that is why we use this system.
  4. can someone please answer me? took more than 2 weeks without answers
  5. solved, if you help me solve: http://maxcheaters.com/forum/index.php?topic=197928.0, I respond with the solution of the announcements to raidboss by ID
  6. matim thanks for your answer, but I will not explain me well. need to regenerate full hp / cp / mp the first infected player. if you know how to do explain to me where you made the change in the code
  7. Hi I have a question how I can do to make the announcement only spawn a single raidboss thanks
  8. This is not to steal the revisions and amendments made in the timeline of projects you can not see the timeline to normal users like l2jserver
  9. Hello! first to acknowledge the idea of Leki very good idea. first visit his post to know what it is. download the program offered in the post of Leki and continue here Post: http://www.maxcheaters.com/forum/index.php?topic=176833.0 create a file here .bat with a configuration file for downloading the patch stolen are more easy, fast and convenient: D here a picture how it works. EDIT: sorry I forgot to put the download link xD http://www.mediafire.com/?qc3585a8dh4d5be Regards. Credit to me for this files Credits to good idea to Leki
  10. Hi I have a question because I can not carry this code I changed to test the transformation "Zombie" and adds custom skill to increase the HP of the transformation. but there is a problem the character is transformed increases hp example: 100k hp but is low for example if the character has 5000 hp and transform instantly adds hp 100000 of the character continues with 5000 hp and lacks 95000 hp regenerate other to have full hp. my question is whether it is possible and how to fix that transform the character to heal all the hp. I leave here I think my code in place that highlight have to modify the code and I think I needed some import. Greetings. Index: Biohazard.java /* * 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.entity; import java.util.Calendar; import java.util.logging.Logger; import javolution.util.FastSet; import com.l2jserver.gameserver.Announcements; import com.l2jserver.gameserver.instancemanager.TransformationManager; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.olympiad.Olympiad; import com.l2jserver.gameserver.network.serverpackets.PlaySound; import com.l2jserver.gameserver.util.Broadcast; import com.l2jserver.util.Rnd; /** * @author Laikeriz update Pixi */ public class Biohazard { enum EventState { INACTIVE, INACTIVATING, REGISTERING, STARTED, REWARDING } private final static Logger _log = Logger.getLogger(Biohazard.class.getName()); private static EventState _state = EventState.INACTIVE; public static FastSet<L2PcInstance> _participants = new FastSet<L2PcInstance>(); public static FastSet<L2PcInstance> _infected = new FastSet<L2PcInstance>(); public static FastSet<L2PcInstance> _notInfected = new FastSet<L2PcInstance>(); public static boolean isStarted() { if (_state == EventState.STARTED) return true; return false; } public static boolean isRegistering() { if (_state == EventState.REGISTERING) return true; return false; } public static void startRegistering() { if (_state == EventState.REGISTERING || _state == EventState.STARTED) return; Announcements.getInstance().announceToAll("Biohazard: Registration is open."); Announcements.getInstance().announceToAll("Biohazard: Type \".bhreg\" to register to event."); Announcements.getInstance().announceToAll("Biohazard: Type \".bhunreg\" to unregister from event."); _state = EventState.REGISTERING; int step = 0; int after = 0; for (int i = 40; i > 0; i-=10) { switch(i) { case 40: step = 5; after = 15; break; case 30: step = 5; after = 10; break; case 20: step = 4; after = 5; break; case 10: step = 1; after = 1; break; } if (_state == EventState.INACTIVE) return; Announcements.getInstance().announceToAll("Biohazard: Registration will be closed in " after " minute(s)."); try{Thread.sleep(step*60000);}catch (Exception e){} } //sound = ""; try{Thread.sleep(60000);}catch (Exception e){} if (_state == EventState.INACTIVE) return; if (_participants.size() >= 2) { Announcements.getInstance().announceToAll("Biohazard: Teleporting players in 20 seconds."); try{Thread.sleep(20000);}catch (Exception e){} _state = EventState.STARTED; startEventAndTelePl(); } else Announcements.getInstance().announceToAll("Biohazard: Event aborted due to lack of participants."); } public static void addParticipant(L2PcInstance player) { if (TvTEvent.isPlayerParticipant(player.getObjectId())) { player.sendMessage("You cannot register because of registration in another event"); return; } if (_state == EventState.REGISTERING && !_participants.contains(player)) { _participants.add(player); player.sendMessage("You have successfully registered to this event"); } else player.sendMessage("You are already registered or it's not registration time."); } public static void removeParticipant(L2PcInstance player) { if (_state == EventState.REGISTERING) { if (_participants.contains(player)) _participants.remove(player); else player.sendMessage("You aren't registered in this event."); player.setIsInBiohazard(false); } else player.sendMessage("It's not registration time."); } public static void startEventAndTelePl() { if (_state == EventState.INACTIVE) return; synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { _notInfected.add(pl); pl._oldX = pl.getX(); pl._oldY = pl.getY(); pl._oldZ = pl.getZ(); pl.teleToLocation(-17507,143206,-3911); pl.setTeam(0); pl.setIsInBiohazard(true); pl.untransform(); } } Announcements.getInstance().announceToAll("Biohazard: Teleportion done."); Announcements.getInstance().announceToAll("Biohazard: One player was infected by untreatable virus!"); Announcements.getInstance().announceToAll("Biohazard: In about one minute virus will take over his body and he will become zombie!"); try{Thread.sleep(60000);}catch (Exception e){} int num = Math.round(Rnd.get(_notInfected.size()-1)); L2PcInstance infectFirst = ((L2PcInstance[])getAllNotInfected())[num]; infectPlayer(infectFirst); Announcements.getInstance().announceToAll("Biohazard: Virus took over " infectFirst.getName() " body and he wants to infect everybody else!"); } [color=red]//I think this is the part of code that needs to be modify[/color] public static void infectPlayer(L2PcInstance zombie) { if (_state == EventState.INACTIVE) return; if (zombie.isTransformed()) zombie.untransform(); zombie.setIsZombie(true); _notInfected.remove(zombie); _infected.add(zombie); TransformationManager.getInstance().transformPlayer(303, zombie); if (_notInfected.size() == 0) zombiesWin(); } public static void onLogout(L2PcInstance playerInstance) { if (_state == EventState.REGISTERING) removeParticipant(playerInstance); else if (_state == EventState.STARTED) { playerInstance.setXYZ(playerInstance._oldX,playerInstance._oldY,playerInstance._oldZ); if (!playerInstance.isZombie()) _notInfected.remove(playerInstance); else if (playerInstance.isZombie()) _infected.remove(playerInstance); if (_notInfected.size() == 0) zombiesWin(); if (_infected.size() == 0) playersWin(); } } public static void zombiesWin() { if (_state == EventState.INACTIVE) return; Announcements.getInstance().announceToAll("Biohazard: Zombies won."); Announcements.getInstance().announceToAll("Biohazard: Rewarding and teleporting participants back to village in 20 seconds."); _state = EventState.REWARDING; try{Thread.sleep(20000);}catch (Exception e){} synchronized(_infected) { for (L2PcInstance pl : _infected) if (pl.isOnlineInt() == 1) pl.addItem("Biohazard", 6673, 1, pl, true); } synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { pl.teleToLocation(pl._oldX,pl._oldY,pl._oldZ); pl.setIsInBiohazard(false); if (pl.isTransformed()) try{Thread.sleep(5000);}catch (Exception e){} pl.untransform(); } } _participants.clear(); _infected.clear(); _notInfected.clear(); _state = EventState.INACTIVE; } public static void playersWin() { Announcements.getInstance().announceToAll("Biohazard: Players won."); Announcements.getInstance().announceToAll("Biohazard: Rewarding and teleporting participants back to village in 20 seconds."); _state = EventState.REWARDING; try{Thread.sleep(20000);}catch (Exception e){} synchronized(_notInfected) { for (L2PcInstance pl : _notInfected) if (pl.isOnlineInt() == 1) { pl.addItem("Biohazard", 6673, 1, pl, true); } } synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { pl.teleToLocation(pl._oldX,pl._oldY,pl._oldZ); pl.setIsInBiohazard(false); // if (pl.inWorld() == 1) // pl.setTeam(pl.getFactionId()); if (pl.isTransformed()) try{Thread.sleep(5000);}catch (Exception e){} pl.untransform(); } } _participants.clear(); _infected.clear(); _notInfected.clear(); _state = EventState.INACTIVE; } public static L2PcInstance[] getAllNotInfected() { synchronized(_notInfected) { return _notInfected.toArray(new L2PcInstance[_notInfected.size()]); } } public static void abortEvent() { _state = EventState.INACTIVE; _participants.clear(); _notInfected.clear(); _infected.clear(); Announcements.getInstance().announceToAll("Biohazard: Event aborted."); } } \ No newline at end of file //I think this is the part of code that needs to be modify public static void infectPlayer(L2PcInstance zombie) { if (_state == EventState.INACTIVE) return; if (zombie.isTransformed()) zombie.untransform(); zombie.setIsZombie(true); _notInfected.remove(zombie); _infected.add(zombie); TransformationManager.getInstance().transformPlayer(303, zombie); if (_notInfected.size() == 0) zombiesWin(); } Topic: http://www.maxcheaters.com/forum/index.php?topic=193636.0
  11. well there just as good code modification ;)
  12. the solution to this problem will find it here: http://www.l2jserver.com/forum/viewtopic.php?f=73&t=14701&hilit=biohazard&start=45#p74162
  13. Hi I have a question because I can not carry this code I changed to test the transformation "Zombie" and adds custom skill to increase the HP of the transformation. but there is a problem the character is transformed increases hp example: 100k hp but is low for example if the character has 5000 hp and transform instantly adds hp 100000 of the character continues with 5000 hp and lacks 95000 hp regenerate other to have full hp. my question is whether it is possible and how to fix that transform the character to heal all the hp. I leave here I think my code in place that highlight have to modify the code and I think I needed some import. Greetings. /* * 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.entity; import java.util.Calendar; import java.util.logging.Logger; import javolution.util.FastSet; import com.l2jserver.gameserver.Announcements; import com.l2jserver.gameserver.instancemanager.TransformationManager; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.olympiad.Olympiad; import com.l2jserver.gameserver.network.serverpackets.PlaySound; import com.l2jserver.gameserver.util.Broadcast; import com.l2jserver.util.Rnd; /** * @author Laikeriz update Pixi */ public class Biohazard { enum EventState { INACTIVE, INACTIVATING, REGISTERING, STARTED, REWARDING } private final static Logger _log = Logger.getLogger(Biohazard.class.getName()); private static EventState _state = EventState.INACTIVE; public static FastSet<L2PcInstance> _participants = new FastSet<L2PcInstance>(); public static FastSet<L2PcInstance> _infected = new FastSet<L2PcInstance>(); public static FastSet<L2PcInstance> _notInfected = new FastSet<L2PcInstance>(); public static boolean isStarted() { if (_state == EventState.STARTED) return true; return false; } public static boolean isRegistering() { if (_state == EventState.REGISTERING) return true; return false; } public static void startRegistering() { if (_state == EventState.REGISTERING || _state == EventState.STARTED) return; Announcements.getInstance().announceToAll("Biohazard: Registration is open."); Announcements.getInstance().announceToAll("Biohazard: Type \".bhreg\" to register to event."); Announcements.getInstance().announceToAll("Biohazard: Type \".bhunreg\" to unregister from event."); _state = EventState.REGISTERING; int step = 0; int after = 0; for (int i = 40; i > 0; i-=10) { switch(i) { case 40: step = 5; after = 15; break; case 30: step = 5; after = 10; break; case 20: step = 4; after = 5; break; case 10: step = 1; after = 1; break; } if (_state == EventState.INACTIVE) return; Announcements.getInstance().announceToAll("Biohazard: Registration will be closed in " after " minute(s)."); try{Thread.sleep(step*60000);}catch (Exception e){} } //sound = ""; try{Thread.sleep(60000);}catch (Exception e){} if (_state == EventState.INACTIVE) return; if (_participants.size() >= 2) { Announcements.getInstance().announceToAll("Biohazard: Teleporting players in 20 seconds."); try{Thread.sleep(20000);}catch (Exception e){} _state = EventState.STARTED; startEventAndTelePl(); } else Announcements.getInstance().announceToAll("Biohazard: Event aborted due to lack of participants."); } public static void addParticipant(L2PcInstance player) { if (TvTEvent.isPlayerParticipant(player.getObjectId())) { player.sendMessage("You cannot register because of registration in another event"); return; } if (_state == EventState.REGISTERING && !_participants.contains(player)) { _participants.add(player); player.sendMessage("You have successfully registered to this event"); } else player.sendMessage("You are already registered or it's not registration time."); } public static void removeParticipant(L2PcInstance player) { if (_state == EventState.REGISTERING) { if (_participants.contains(player)) _participants.remove(player); else player.sendMessage("You aren't registered in this event."); player.setIsInBiohazard(false); } else player.sendMessage("It's not registration time."); } public static void startEventAndTelePl() { if (_state == EventState.INACTIVE) return; synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { _notInfected.add(pl); pl._oldX = pl.getX(); pl._oldY = pl.getY(); pl._oldZ = pl.getZ(); pl.teleToLocation(-17507,143206,-3911); pl.setTeam(0); pl.setIsInBiohazard(true); pl.untransform(); } } Announcements.getInstance().announceToAll("Biohazard: Teleportion done."); Announcements.getInstance().announceToAll("Biohazard: One player was infected by untreatable virus!"); Announcements.getInstance().announceToAll("Biohazard: In about one minute virus will take over his body and he will become zombie!"); try{Thread.sleep(60000);}catch (Exception e){} int num = Math.round(Rnd.get(_notInfected.size()-1)); L2PcInstance infectFirst = ((L2PcInstance[])getAllNotInfected())[num]; infectPlayer(infectFirst); Announcements.getInstance().announceToAll("Biohazard: Virus took over " infectFirst.getName() " body and he wants to infect everybody else!"); } [color=red]//I think this is the part of code that needs to be modify[/color] public static void infectPlayer(L2PcInstance zombie) { if (_state == EventState.INACTIVE) return; if (zombie.isTransformed()) zombie.untransform(); zombie.setIsZombie(true); _notInfected.remove(zombie); _infected.add(zombie); TransformationManager.getInstance().transformPlayer(303, zombie); if (_notInfected.size() == 0) zombiesWin(); } public static void onLogout(L2PcInstance playerInstance) { if (_state == EventState.REGISTERING) removeParticipant(playerInstance); else if (_state == EventState.STARTED) { playerInstance.setXYZ(playerInstance._oldX,playerInstance._oldY,playerInstance._oldZ); if (!playerInstance.isZombie()) _notInfected.remove(playerInstance); else if (playerInstance.isZombie()) _infected.remove(playerInstance); if (_notInfected.size() == 0) zombiesWin(); if (_infected.size() == 0) playersWin(); } } public static void zombiesWin() { if (_state == EventState.INACTIVE) return; Announcements.getInstance().announceToAll("Biohazard: Zombies won."); Announcements.getInstance().announceToAll("Biohazard: Rewarding and teleporting participants back to village in 20 seconds."); _state = EventState.REWARDING; try{Thread.sleep(20000);}catch (Exception e){} synchronized(_infected) { for (L2PcInstance pl : _infected) if (pl.isOnlineInt() == 1) pl.addItem("Biohazard", 6673, 1, pl, true); } synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { pl.teleToLocation(pl._oldX,pl._oldY,pl._oldZ); pl.setIsInBiohazard(false); if (pl.isTransformed()) try{Thread.sleep(5000);}catch (Exception e){} pl.untransform(); } } _participants.clear(); _infected.clear(); _notInfected.clear(); _state = EventState.INACTIVE; } public static void playersWin() { Announcements.getInstance().announceToAll("Biohazard: Players won."); Announcements.getInstance().announceToAll("Biohazard: Rewarding and teleporting participants back to village in 20 seconds."); _state = EventState.REWARDING; try{Thread.sleep(20000);}catch (Exception e){} synchronized(_notInfected) { for (L2PcInstance pl : _notInfected) if (pl.isOnlineInt() == 1) { pl.addItem("Biohazard", 6673, 1, pl, true); } } synchronized(_participants) { for (L2PcInstance pl : _participants) if (pl.isOnlineInt() == 1) { pl.teleToLocation(pl._oldX,pl._oldY,pl._oldZ); pl.setIsInBiohazard(false); // if (pl.inWorld() == 1) // pl.setTeam(pl.getFactionId()); if (pl.isTransformed()) try{Thread.sleep(5000);}catch (Exception e){} pl.untransform(); } } _participants.clear(); _infected.clear(); _notInfected.clear(); _state = EventState.INACTIVE; } public static L2PcInstance[] getAllNotInfected() { synchronized(_notInfected) { return _notInfected.toArray(new L2PcInstance[_notInfected.size()]); } } public static void abortEvent() { _state = EventState.INACTIVE; _participants.clear(); _notInfected.clear(); _infected.clear(); Announcements.getInstance().announceToAll("Biohazard: Event aborted."); } } \ No newline at end of file //I think this is the part of code that needs to be modify public static void infectPlayer(L2PcInstance zombie) { if (_state == EventState.INACTIVE) return; if (zombie.isTransformed()) zombie.untransform(); zombie.setIsZombie(true); _notInfected.remove(zombie); _infected.add(zombie); TransformationManager.getInstance().transformPlayer(303, zombie); if (_notInfected.size() == 0) zombiesWin(); }
  14. NetworkHelperBufferCount = 20 I did not know that could change and do better so thanks probe
  15. really thank you for sharing this code I'll try to have it works bye
  16. good share thanks, i need more restriccions for player low levels i now where find ?
×
×
  • Create New...