Ir para conteúdo
  • Cadastre-se
  • 0

Pequeno error ao compilar


AikoN~

Pergunta

Oi, estou tendo alguns  erros estranhos na hora que vou compilar um Mod que adicionei de um evento CastleWar. 

baNaTiS.png

Ai a hora que clico nos link dos supostos erros não fazem o menor sentido, porque isso também tem nos TvT, DM, CTF e não gera erros

kL1vKSf.png

Ai toda vez que eu ADD o .Java ele fica com um incone diferente dos outros, não sei porque????

96lErA0.png

 

Alguem pode me ajudar arrumar isso? Obrigada. 

OBS: Quando fui instalar o programinha (Slik-Subversion-1.7.2-x64) deu esse error:

csiulDQ.png

Pode ser isso a causa dos meus erros acima??? Como instalo esse programa :(

 

 

spacer.png

Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts recomendados

  • 0
Em 14/10/2017 at 22:53, GianT disse:

Caramba eim! Que dificuldade já te disse, retira o mod completo e coloca novamente porque o problema tá é no modo que tu ta colocando eu testei esse code e ta ok.

Presta atenção nos caminhos que o mod manda criar os arquivos, não tem erro o código ta limpo.

Consegui! Eu estava ADD algumas linhas que não precisavam... kkk 

Você saberia um código para ADD esse evento de forma automatica, assim como o TvT? Ou melhor, adicionar ele a um NPC para ficar funcionando 24hr por dia... 

-

Mesmo assim, muito obrigada pela atenção e a ajuda. <3

 

spacer.png

Link para o comentário
Compartilhar em outros sites


  • 0
23 minutes ago, Psiu said:

Oi, estou tendo alguns  erros estranhos na hora que vou compilar um Mod que adicionei de um evento CastleWar. 

baNaTiS.png

Ai a hora que clico nos link dos supostos erros não fazem o menor sentido, porque isso também tem nos TvT, DM, CTF e não gera erros

kL1vKSf.png

Ai toda vez que eu ADD o .Java ele fica com um incone diferente dos outros, não sei porque????

96lErA0.png

 

Alguem pode me ajudar arrumar isso? Obrigada. 

OBS: Quando fui instalar o programinha (Slik-Subversion-1.7.2-x64) deu esse error:

csiulDQ.png

Pode ser isso a causa dos meus erros acima??? Como instalo esse programa :(

 

 

Vc nao precisa desse programa para compilar , pq foi instalar?

Tenta desinstalar ele e se nao der , apagar tudo do workspace e voltar a instalar o eclipse e seu setup. 

Instala so subversion https://www.eclipse.org/subversive/downloads.php

Link para o comentário
Compartilhar em outros sites

  • 0
16 minutos atrás, nerdinho disse:

Vc nao precisa desse programa para compilar , pq foi instalar?

Tenta desinstalar ele e se nao der , apagar tudo do workspace e voltar a instalar o eclipse e seu setup. 

Instala so subversion https://www.eclipse.org/subversive/downloads.php

Han? De qual programa você está falando que não preciso? do (Slik-Subversion-1.7.2-x64)?? Eu nem consegui estar ele mesmo... 

Eu preciso muito resolver os meus erros ali... 

spacer.png

Link para o comentário
Compartilhar em outros sites

  • 0
42 minutos atrás, GianT disse:

Poste o código aqui do evento fazendo favor completo

Esse evento é conhecido, aqui o link de onde foi postado.

 

  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jSanne_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 45)
  6. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  7. @@ -143,6 +143,7 @@
  8.  import com.l2jfrozen.gameserver.model.entity.Announcements;
  9.  import com.l2jfrozen.gameserver.model.entity.Duel;
  10.  import com.l2jfrozen.gameserver.model.entity.L2Rebirth;
  11. +import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  12.  import com.l2jfrozen.gameserver.model.entity.event.CTF;
  13.  import com.l2jfrozen.gameserver.model.entity.event.DM;
  14.  //import com.l2jfrozen.gameserver.model.entity.event.L2Event;
  15. @@ -251,6 +252,11 @@
  16.   */
  17.  public final class L2PcInstance extends L2PlayableInstance
  18.  {
  19. +       // Castle War Event.
  20. +       public boolean isinCastleWars=false;
  21. +       public boolean isAttacker=false;
  22. +    public boolean isDefender=false;
  23. +      
  24.         /** The Constant RESTORE_SKILLS_FOR_CHAR. */
  25.         private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";
  26.  
  27. @@ -7831,6 +7837,12 @@
  28.                                         pk.kills.add(getName());
  29.                                 }
  30.                                
  31. +                               if (CastleWars.isRunning && (isinCastleWars && pk.isinCastleWars))
  32. +                                       {
  33. +                                               sendMessage("You will be revived in your spot");
  34. +                                                              
  35. +                                       }                                
  36. +                              
  37.                                 if (_inEventTvT && pk._inEventTvT)
  38.                                 {
  39.                                         if (TvT.is_teleport() || TvT.is_started())
  40. @@ -16100,6 +16112,20 @@
  41.                 sendPacket(new EtcStatusUpdate(this));
  42.                 _reviveRequested = 0;
  43.                 _revivePower = 0;
  44. +              
  45. +               if (CastleWars.isRunning)
  46. +                       {
  47. +                       if (isAttacker)
  48. +                               {
  49. +                                              
  50. +                                       teleToLocation(CastleWars.attackersx, CastleWars.attackersy, CastleWars.attackersz);
  51. +                               }
  52. +                               if (isDefender)
  53. +                               {
  54. +                                              
  55. +                                       teleToLocation(CastleWars.defendersx, CastleWars.defendersy, CastleWars.defendersz);
  56. +                               }
  57. +                       }
  58.  
  59.                 if(isInParty() && getParty().isInDimensionalRift())
  60.                 {
  61. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
  62. ===================================================================
  63. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (revision 45)
  64. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (working copy)
  65. @@ -58,6 +58,7 @@
  66.  import com.l2jfrozen.gameserver.model.actor.knownlist.NpcKnownList;
  67.  import com.l2jfrozen.gameserver.model.actor.stat.NpcStat;
  68.  import com.l2jfrozen.gameserver.model.actor.status.NpcStatus;
  69. +import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  70.  import com.l2jfrozen.gameserver.model.entity.event.CTF;
  71.  import com.l2jfrozen.gameserver.model.entity.event.DM;
  72.  import com.l2jfrozen.gameserver.model.entity.event.L2Event;
  73. @@ -3074,6 +3075,16 @@
  74.                 if (!super.doDie(killer))
  75.                         return false;
  76.                
  77. +               if (getNpcId() == 36006)
  78. +                       {
  79. +                               if(!CastleWars.isFinished)
  80. +                               {
  81. +                                       CastleWars.flagskilled++;
  82. +                                       CastleWars.attackersWin();
  83. +                               }
  84. +                              
  85. +                       }
  86. +              
  87.                 // normally this wouldn't really be needed, but for those few exceptions,
  88.                 // we do need to reset the weapons back to the initial templated weapon.
  89.                 _currentLHandId = getTemplate().lhand;
  90. Index: head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
  91. ===================================================================
  92. --- head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java  (revision 45)
  93. +++ head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java  (working copy)
  94. @@ -32,6 +32,7 @@
  95.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBBS;
  96.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBan;
  97.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBuffs;
  98. +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCastlewars;
  99.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCTFEngine;
  100.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCache;
  101.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChangeAccessLevel;
  102. @@ -191,6 +192,7 @@
  103.                 registerAdminCommandHandler(new AdminVip());
  104.                 registerAdminCommandHandler(new AdminCharSupervision());
  105.                 registerAdminCommandHandler(new AdminCrazy());
  106. +               registerAdminCommandHandler(new AdminCastlewars());
  107.                 registerAdminCommandHandler(new AdminWho()); // L2OFF command
  108.                 // ATTENTION: adding new command handlers, you have to change the
  109.                 // sql file containing the access levels rights
  110. Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
  111. ===================================================================
  112. --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 45)
  113. +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy)
  114. @@ -27,6 +27,7 @@
  115.  import com.l2jfrozen.gameserver.GameServer;
  116.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.AwayCmd;
  117.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.BankingCmd;
  118. +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CastleWarsRegi;
  119.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd;
  120.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd;
  121.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.EventJoin;
  122. @@ -68,6 +69,7 @@
  123.                 registerVoicedCommandHandler(new Voting());
  124.                
  125.                 registerVoicedCommandHandler(new EventJoin());
  126. +               registerVoicedCommandHandler(new CastleWarsRegi());
  127.                
  128.                 if (Config.BANKING_SYSTEM_ENABLED)
  129.                 {
  130. Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java
  131. ===================================================================
  132. --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java (revision 0)
  133. +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java (working copy)
  134. @@ -0,0 +1,96 @@
  135. + /*
  136. +  * This program is free software: you can redistribute it and/or modify it under
  137. +  * the terms of the GNU General Public License as published by the Free Software
  138. +  * Foundation, either version 3 of the License, or (at your option) any later
  139. +  * version.
  140. +  *
  141. +  * This program is distributed in the hope that it will be useful, but WITHOUT
  142. +  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  143. +  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  144. +  * details.
  145. +  *
  146. +  * You should have received a copy of the GNU General Public License along with
  147. +  * this program. If not, see <http://www.gnu.org/licenses/>.
  148. +  */
  149. + package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
  150. +
  151. + import java.io.File;
  152. +
  153. + import com.l2jfrozen.Config;
  154. + import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
  155. + import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  156. + import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  157. +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  158. +
  159. + /**
  160. +  * @author Boorinio
  161. +  */
  162. + public class CastleWarsRegi implements IVoicedCommandHandler
  163. + {
  164. +       private static final String[] VOICED_COMMANDS =
  165. +       {
  166. +       "join", "leave"
  167. +       };
  168. +      
  169. +       @SuppressWarnings("unused")
  170. +       @Override
  171. + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  172. +       {
  173. +               if(CastleWars.CastleRegi)
  174. +               {
  175. +                       if (command.startsWith(VOICED_COMMANDS[0])&& isEligible(activeChar))
  176. +                       {
  177. +                               activeChar.isinCastleWars =  true;
  178. +                               activeChar.sendMessage("You are now registered to CastleWars event!");
  179. +                               String CastleWars_Path = "data/html/CastleTutorial.htm";
  180. +                               File mainText = new File(Config.DATAPACK_ROOT, CastleWars_Path);
  181. +                               NpcHtmlMessage html = new NpcHtmlMessage(1);
  182. +                               html.setFile(CastleWars_Path);
  183. +                               activeChar.sendPacket(html);
  184. +                       }
  185. +                       if(command.startsWith(VOICED_COMMANDS[1])&&activeChar.isinCastleWars)
  186. +                       {
  187. +                               activeChar.isinCastleWars =  false;
  188. +                               activeChar.sendMessage("You are now unregistered.");
  189. +                       }
  190. +               }
  191. +               else
  192. +               {
  193. +                       if (command.startsWith(VOICED_COMMANDS[0])||(command.startsWith(VOICED_COMMANDS[1])))
  194. +                               {
  195. +                                 activeChar.sendMessage("CastleWars registrations are inactive.");
  196. +                               }
  197. +               }
  198. +               return true;
  199. +       }
  200. +       public boolean isEligible(L2PcInstance player)
  201. +       {
  202. +               if(player.isinCastleWars)
  203. +       {
  204. +                       player.sendMessage("You are already Registered");
  205. +                       return false;
  206. +               }
  207. +               if(player.getLevel()<76)
  208. +               {
  209. +                       player.sendMessage("You are low level");
  210. +                       return false;
  211. +               }
  212. +               if(player.isInJail())
  213. +               {
  214. +                       player.sendMessage("You are in jail...daah");
  215. +                       return false;
  216. +               }
  217. +               if(player.isInOlympiadMode())
  218. +               {
  219. +                       player.sendMessage("You are in olympiad mode");
  220. +                       return false;
  221. +               }
  222. +               return true;
  223. +       }
  224. +      
  225. +       @Override
  226. +       public String[] getVoicedCommandList()
  227. +       {
  228. +               return VOICED_COMMANDS;
  229. +       }
  230. + }
  231. \ No newline at end of file
  232. Index: head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java
  233. ===================================================================
  234. --- head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java        (revision 0)
  235. +++ head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java        (working copy)
  236. @@ -0,0 +1,261 @@
  237. + /*
  238. +  * This program is free software: you can redistribute it and/or modify it under
  239. +  * the terms of the GNU General Public License as published by the Free Software
  240. +  * Foundation, either version 3 of the License, or (at your option) any later
  241. +  * version.
  242. +  *
  243. +  * This program is distributed in the hope that it will be useful, but WITHOUT
  244. +  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  245. +  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  246. +  * details.
  247. +  *
  248. +  * You should have received a copy of the GNU General Public License along with
  249. +  * this program. If not, see <http://www.gnu.org/licenses/>.
  250. +  */
  251. + /**
  252. +  * @author Boorinio
  253. +  */
  254. + package com.l2jfrozen.gameserver.model.entity.event;
  255. +
  256. + import java.util.List;
  257. +
  258. + import com.l2jfrozen.gameserver.model.entity.Announcements;
  259. + import com.l2jfrozen.gameserver.datatables.csv.DoorTable;
  260. + import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
  261. + import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
  262. + import com.l2jfrozen.gameserver.model.L2World;
  263. + import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
  264. + import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  265. + import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
  266. +
  267. + import javolution.util.FastList;
  268. + import javolution.util.FastSet;
  269. +
  270. + public class CastleWars
  271. + {
  272. +       private static List<L2PcInstance> _defenders = new FastList<L2PcInstance>();
  273. +       private static List<L2PcInstance> _attackers = new FastList<L2PcInstance>();
  274. +       private static FastSet<L2NpcInstance> _flags = new FastSet<L2NpcInstance>();
  275. +       public static boolean isFinished;
  276. +       public static boolean CastleRegi;
  277. +       public static boolean isRunning;
  278. +       private static boolean alaksokolies = false;
  279. +       private static int i;
  280. +       public static int flagskilled = 0;
  281. +       public static int defendersx = 77566;
  282. +       public static int defendersy = -152128;
  283. +       public static int defendersz = -545;
  284. +       public static int attackersx = 84303;
  285. +       public static int attackersy = -140727;
  286. +       public static int attackersz = -1568;
  287. +       public static int[] flagslocx =
  288. +       {
  289. +       77545, 76663, 78446,
  290. +       };
  291. +       private static int[] flagslocy =
  292. +       {
  293. +       -149937, -154522, -154524,
  294. +       };
  295. +       private static int[] flagslocz =
  296. +       {
  297. +       345, 128, 235,
  298. +       };
  299. +      
  300. +       public static void openRegi()
  301. +       {
  302. +               Announcements.getInstance().announceToAll("Castle Wars Event has Started!");
  303. +               Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
  304. +               Announcements.getInstance().announceToAll("You have 5 minutes to register!");
  305. +               isRunning = true;
  306. +               isFinished = false;
  307. +               CastleRegi = true;
  308. +               waitSecs(300);
  309. +               stopRegi();
  310. +               preparecastle();
  311. +               shufflePlayers();
  312. +               teleportThem();
  313. +               Announcements.getInstance().announceToAll("You have 10 minutes till the event is finished!");
  314. +               waitSecs(600);
  315. +               if (!isFinished)
  316. +               {
  317. +                       defendersWin();
  318. +                      
  319. +               }
  320. +              
  321. +       }
  322. +      
  323. +       public static void preparecastle()
  324. +       {
  325. +               DoorTable.getInstance().getDoor(22130001).openMe();
  326. +               DoorTable.getInstance().getDoor(22130002).openMe();
  327. +               DoorTable.getInstance().getDoor(22130003).openMe();
  328. +               DoorTable.getInstance().getDoor(22130004).openMe();
  329. +               DoorTable.getInstance().getDoor(22130005).openMe();
  330. +               DoorTable.getInstance().getDoor(22130010).openMe();
  331. +               DoorTable.getInstance().getDoor(22130007).openMe();
  332. +               DoorTable.getInstance().getDoor(22130011).openMe();
  333. +               DoorTable.getInstance().getDoor(22130009).openMe();
  334. +               DoorTable.getInstance().getDoor(22130008).openMe();
  335. +               DoorTable.getInstance().getDoor(22130010).openMe();
  336. +               DoorTable.getInstance().getDoor(22130006).openMe();
  337. +               L2NpcInstance flags = null;
  338. +               for (i = 0; i < 3; i++)
  339. +               {
  340. +                       flags = addSpawn(36006, flagslocx, flagslocy, flagslocz);
+                       _flags.add(flags);
+               }
+       }
+      
+       public static void cleanevent()
+       {
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.getAppearance().setNameColor(0xFFFFFF);
+                       defender.setTitle("");
+                       defender.broadcastUserInfo();
+                       defender.teleToLocation(82724, 148307, -3469);
+                       defender.isinCastleWars = false;
+                       defender.isDefender=false;
+               }
+               for (L2PcInstance attacker : _attackers)
+               {
+                       attacker.getAppearance().setNameColor(0xFFFFFF);
+                       attacker.setTitle("");
+                       attacker.broadcastUserInfo();
+                       attacker.teleToLocation(82724, 148307, -3469);
+                       attacker.isinCastleWars = false;
+                       attacker.isAttacker=false;
+               }
+               for (L2NpcInstance flags : _flags)
+               {
+                       flags.deleteMe();
+                      
+               }
+               flagskilled = 0;
+               _flags.clear();
+               _defenders.clear();
+               _attackers.clear();
+               DoorTable.getInstance().getDoor(22130001).closeMe();
+               DoorTable.getInstance().getDoor(22130002).closeMe();
+               DoorTable.getInstance().getDoor(22130003).closeMe();
+               DoorTable.getInstance().getDoor(22130004).closeMe();
+               DoorTable.getInstance().getDoor(22130005).closeMe();
+               DoorTable.getInstance().getDoor(22130010).closeMe();
+               DoorTable.getInstance().getDoor(22130007).closeMe();
+               DoorTable.getInstance().getDoor(22130011).closeMe();
+               DoorTable.getInstance().getDoor(22130009).closeMe();
+               DoorTable.getInstance().getDoor(22130008).closeMe();
+               DoorTable.getInstance().getDoor(22130010).closeMe();
+               DoorTable.getInstance().getDoor(22130006).closeMe();
+       }
+      
+       public static void defendersWin()
+       {
+               Announcements.getInstance().announceToAll("Defenders Won the event they protected the flags!");
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.sendMessage("Congratulations! Here is a reward for your effort!");
+                       defender.addItem("Reward", 3470, 1, defender, true);
+               }
+               isFinished = true;
+               cleanevent();
+       }
+      
+       public static void attackersWin()
+       {
+               if (flagskilled == 3)
+               {
+                       Announcements.getInstance().announceToAll("Attackers Won the event they killed all the flags!");
+                       for (L2PcInstance attacker : _attackers)
+                       {
+                               attacker.sendMessage("Congratulations! Here is a reward for your effort!");
+                               attacker.addItem("Reward", 3470, 1, attacker, true);
+                       }
+                       isFinished = true;
+                       cleanevent();
+               }
+       }
+      
+       public static void teleportThem()
+       {
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.teleToLocation(defendersx, defendersy, defendersz);
+               }
+               for (L2PcInstance attacker : _attackers)
+               {
+                       attacker.teleToLocation(attackersx, attackersy, attackersz);
+               }
+       }
+      
+       public static void stopRegi()
+       {
+               Announcements.getInstance().announceToAll("Registrations are now over!");
+               CastleRegi = false;
+       }
+      
+       public static void shufflePlayers()
+       {
+               for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+               {
+                       if (player.isinCastleWars)
+                       {
+                               if (alaksokolies)
+                               {
+                                       _defenders.add(player);
+                                       player.getAppearance().setNameColor(0xFF0000);
+                                       player.setTitle("Defender");
+                                       player.broadcastUserInfo();
+                                       player.isDefender=true;
+                                       alaksokolies = false;
+                               }
+                               else
+                               {
+                                       _attackers.add(player);
+                                       player.getAppearance().setNameColor(0x0000FF);
+                                       player.setTitle("Attacker");
+                                       player.broadcastUserInfo();
+                                       player.isAttacker=true;
+                                       alaksokolies = true;
+                               }
+                       }
+               }
+       }
+      
+       public static void waitSecs(int i)
+       {
+               try
+               {
+                       Thread.sleep(i * 1000);
+               }
+               catch (InterruptedException ie)
+               {
+                       ie.printStackTrace();
+               }
+       }
+      
+       private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+       {
+               L2NpcInstance result = null;
+               try
+               {
+                       L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+                       if (template != null)
+                       {
+                               L2Spawn spawn = new L2Spawn(template);
+                               spawn.setInstanceId(0);
+                               spawn.setHeading(1);
+                               spawn.setLocx(x);
+                               spawn.setLocy(y);
+                               spawn.setLocz(z);
+                               spawn.stopRespawn();
+                               result = spawn.spawnOne();
+                               return result;
+                       }
+               }
+               catch (Exception e1)
+               {
+               }
+               return null;
+       }
+ }
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java (working copy)
@@ -0,0 +1,52 @@
+/*
+ * 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.admincommandhandlers;
+
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
+
+
+public class AdminCastlewars implements IAdminCommandHandler
+{
+
+       private static final String[] ADMIN_COMMANDS =
+       {
+               "admin_castlewars"
+       };
+      
+        @SuppressWarnings("unused")
+       private enum CommandEnum
+        {
+                admin_castlewars
+        }
+      
+       @Override
+       public boolean useAdminCommand(String command, L2PcInstance activeChar)
+       {
+               if (command.equals("admin_castlewars"))
+              
+               CastleWars.openRegi();
+              
+               return true;
+       }
+      
+       @Override
+       public String[] getAdminCommandList()
+       {
+               return ADMIN_COMMANDS;
+       }
+      
+      
+       }
\ No newline at end of file
Index: l2jfrozen/data/html/CastleTutorial.htm
===================================================================
--- l2jfrozen/data/html/CastleTutorial.htm      (revision 0)
+++ l2jfrozen/data/html/CastleTutorial.htm      (revision 0)
@@ -0,0 +1,14 @@
+<html><title>CastleWars Tutorial</title><body>Jail:<br>
+Once the Event starts:<br>
+-If you are a defender:<br>
+You need to defend all of the castle's flags<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you succeed for 10 minutes you win the event<br>
+<br>
+-If you are an attacker:
+You need to kill all the flags in the castle<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you kill all 3 flags the event ends!<br>
+</body></html>
\ No newline at end of file
Index: l2jfrozen/sql/game/npc.sql
===================================================================
--- l2jfrozen/sql/game/npc.sql  (revision 189)
+++ l2jfrozen/sql/game/npc.sql  (working copy)
@@ -6608,7 +6608,8 @@
        (36002,29022,'Zaken',0,'',0,'Monster.zaken',16.00,32.00,60,'male','L2GrandBoss',40,858518,1975,799.68,2.45,60,57,73,76,70,80,4879745,423589,7273,2951,19762,1197,333,0,3819,0,0,0,68,275,NULL,0,1,12,'FULL_PARTY'),
        (36003,29019,'Antharas',0,'',0,'Monster.antaras',300.00,300.00,79,'male','L2GrandBoss',40,13090000,22197,2380.00,265.32,60,57,73,76,70,80,262720918,29116376,13308,8064,28099,1641,333,0,3819,0,0,0,81,301,NULL,0,0,13,'FULL_PARTY'),
        (36004,29028,'Valakas',0,'',0,'Monster2.valakas',190.00,335.00,85,'male','L2GrandBoss',40,16660000,22197,2856.00,265.32,60,57,73,76,70,80,284286178,27215401,14375,7999,36620,1999,333,0,3819,0,0,0,194,486,'valakas_clan',300,0,13,'FULL_PARTY'),
        (36005,29001,'Queen Ant',0,'',0,'Monster.queen_ant',45.00,53.00,40,'female','L2GrandBoss',40,229898,667,495.04,2.14,60,57,73,76,70,80,2179535,140740,329,1615,77,655,278,0,3819,0,0,0,129,372,'queen_ant_clan',1000,0,0,'LAST_HIT'),
+       (36006,35062,'CaptureFlag',0,'',0,'Deco.flag_a',21.00,82.00,1,'etc','L2Monster',80,700000,989,3.16,0.91,40,43,30,21,20,10,0,0,652,753,358,295,423,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT');
RAW Paste Data
 

spacer.png

Link para o comentário
Compartilhar em outros sites

  • 0
2 horas atrás, Psiu disse:

 

  Mostrar conteúdo oculto

 

  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jSanne_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 45)
  6. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  7. @@ -143,6 +143,7 @@
  8.  import com.l2jfrozen.gameserver.model.entity.Announcements;
  9.  import com.l2jfrozen.gameserver.model.entity.Duel;
  10.  import com.l2jfrozen.gameserver.model.entity.L2Rebirth;
  11. +import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  12.  import com.l2jfrozen.gameserver.model.entity.event.CTF;
  13.  import com.l2jfrozen.gameserver.model.entity.event.DM;
  14.  //import com.l2jfrozen.gameserver.model.entity.event.L2Event;
  15. @@ -251,6 +252,11 @@
  16.   */
  17.  public final class L2PcInstance extends L2PlayableInstance
  18.  {
  19. +       // Castle War Event.
  20. +       public boolean isinCastleWars=false;
  21. +       public boolean isAttacker=false;
  22. +    public boolean isDefender=false;
  23. +      
  24.         /** The Constant RESTORE_SKILLS_FOR_CHAR. */
  25.         private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";
  26.  
  27. @@ -7831,6 +7837,12 @@
  28.                                         pk.kills.add(getName());
  29.                                 }
  30.                                
  31. +                               if (CastleWars.isRunning && (isinCastleWars && pk.isinCastleWars))
  32. +                                       {
  33. +                                               sendMessage("You will be revived in your spot");
  34. +                                                              
  35. +                                       }                                
  36. +                              
  37.                                 if (_inEventTvT && pk._inEventTvT)
  38.                                 {
  39.                                         if (TvT.is_teleport() || TvT.is_started())
  40. @@ -16100,6 +16112,20 @@
  41.                 sendPacket(new EtcStatusUpdate(this));
  42.                 _reviveRequested = 0;
  43.                 _revivePower = 0;
  44. +              
  45. +               if (CastleWars.isRunning)
  46. +                       {
  47. +                       if (isAttacker)
  48. +                               {
  49. +                                              
  50. +                                       teleToLocation(CastleWars.attackersx, CastleWars.attackersy, CastleWars.attackersz);
  51. +                               }
  52. +                               if (isDefender)
  53. +                               {
  54. +                                              
  55. +                                       teleToLocation(CastleWars.defendersx, CastleWars.defendersy, CastleWars.defendersz);
  56. +                               }
  57. +                       }
  58.  
  59.                 if(isInParty() && getParty().isInDimensionalRift())
  60.                 {
  61. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
  62. ===================================================================
  63. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (revision 45)
  64. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java   (working copy)
  65. @@ -58,6 +58,7 @@
  66.  import com.l2jfrozen.gameserver.model.actor.knownlist.NpcKnownList;
  67.  import com.l2jfrozen.gameserver.model.actor.stat.NpcStat;
  68.  import com.l2jfrozen.gameserver.model.actor.status.NpcStatus;
  69. +import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  70.  import com.l2jfrozen.gameserver.model.entity.event.CTF;
  71.  import com.l2jfrozen.gameserver.model.entity.event.DM;
  72.  import com.l2jfrozen.gameserver.model.entity.event.L2Event;
  73. @@ -3074,6 +3075,16 @@
  74.                 if (!super.doDie(killer))
  75.                         return false;
  76.                
  77. +               if (getNpcId() == 36006)
  78. +                       {
  79. +                               if(!CastleWars.isFinished)
  80. +                               {
  81. +                                       CastleWars.flagskilled++;
  82. +                                       CastleWars.attackersWin();
  83. +                               }
  84. +                              
  85. +                       }
  86. +              
  87.                 // normally this wouldn't really be needed, but for those few exceptions,
  88.                 // we do need to reset the weapons back to the initial templated weapon.
  89.                 _currentLHandId = getTemplate().lhand;
  90. Index: head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
  91. ===================================================================
  92. --- head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java  (revision 45)
  93. +++ head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java  (working copy)
  94. @@ -32,6 +32,7 @@
  95.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBBS;
  96.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBan;
  97.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminBuffs;
  98. +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCastlewars;
  99.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCTFEngine;
  100.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCache;
  101.  import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChangeAccessLevel;
  102. @@ -191,6 +192,7 @@
  103.                 registerAdminCommandHandler(new AdminVip());
  104.                 registerAdminCommandHandler(new AdminCharSupervision());
  105.                 registerAdminCommandHandler(new AdminCrazy());
  106. +               registerAdminCommandHandler(new AdminCastlewars());
  107.                 registerAdminCommandHandler(new AdminWho()); // L2OFF command
  108.                 // ATTENTION: adding new command handlers, you have to change the
  109.                 // sql file containing the access levels rights
  110. Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
  111. ===================================================================
  112. --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 45)
  113. +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy)
  114. @@ -27,6 +27,7 @@
  115.  import com.l2jfrozen.gameserver.GameServer;
  116.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.AwayCmd;
  117.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.BankingCmd;
  118. +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CastleWarsRegi;
  119.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd;
  120.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd;
  121.  import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.EventJoin;
  122. @@ -68,6 +69,7 @@
  123.                 registerVoicedCommandHandler(new Voting());
  124.                
  125.                 registerVoicedCommandHandler(new EventJoin());
  126. +               registerVoicedCommandHandler(new CastleWarsRegi());
  127.                
  128.                 if (Config.BANKING_SYSTEM_ENABLED)
  129.                 {
  130. Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java
  131. ===================================================================
  132. --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java (revision 0)
  133. +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/CastleWarsRegi.java (working copy)
  134. @@ -0,0 +1,96 @@
  135. + /*
  136. +  * This program is free software: you can redistribute it and/or modify it under
  137. +  * the terms of the GNU General Public License as published by the Free Software
  138. +  * Foundation, either version 3 of the License, or (at your option) any later
  139. +  * version.
  140. +  *
  141. +  * This program is distributed in the hope that it will be useful, but WITHOUT
  142. +  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  143. +  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  144. +  * details.
  145. +  *
  146. +  * You should have received a copy of the GNU General Public License along with
  147. +  * this program. If not, see <http://www.gnu.org/licenses/>.
  148. +  */
  149. + package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
  150. +
  151. + import java.io.File;
  152. +
  153. + import com.l2jfrozen.Config;
  154. + import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
  155. + import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  156. + import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
  157. +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  158. +
  159. + /**
  160. +  * @author Boorinio
  161. +  */
  162. + public class CastleWarsRegi implements IVoicedCommandHandler
  163. + {
  164. +       private static final String[] VOICED_COMMANDS =
  165. +       {
  166. +       "join", "leave"
  167. +       };
  168. +      
  169. +       @SuppressWarnings("unused")
  170. +       @Override
  171. + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  172. +       {
  173. +               if(CastleWars.CastleRegi)
  174. +               {
  175. +                       if (command.startsWith(VOICED_COMMANDS[0])&& isEligible(activeChar))
  176. +                       {
  177. +                               activeChar.isinCastleWars =  true;
  178. +                               activeChar.sendMessage("You are now registered to CastleWars event!");
  179. +                               String CastleWars_Path = "data/html/CastleTutorial.htm";
  180. +                               File mainText = new File(Config.DATAPACK_ROOT, CastleWars_Path);
  181. +                               NpcHtmlMessage html = new NpcHtmlMessage(1);
  182. +                               html.setFile(CastleWars_Path);
  183. +                               activeChar.sendPacket(html);
  184. +                       }
  185. +                       if(command.startsWith(VOICED_COMMANDS[1])&&activeChar.isinCastleWars)
  186. +                       {
  187. +                               activeChar.isinCastleWars =  false;
  188. +                               activeChar.sendMessage("You are now unregistered.");
  189. +                       }
  190. +               }
  191. +               else
  192. +               {
  193. +                       if (command.startsWith(VOICED_COMMANDS[0])||(command.startsWith(VOICED_COMMANDS[1])))
  194. +                               {
  195. +                                 activeChar.sendMessage("CastleWars registrations are inactive.");
  196. +                               }
  197. +               }
  198. +               return true;
  199. +       }
  200. +       public boolean isEligible(L2PcInstance player)
  201. +       {
  202. +               if(player.isinCastleWars)
  203. +       {
  204. +                       player.sendMessage("You are already Registered");
  205. +                       return false;
  206. +               }
  207. +               if(player.getLevel()<76)
  208. +               {
  209. +                       player.sendMessage("You are low level");
  210. +                       return false;
  211. +               }
  212. +               if(player.isInJail())
  213. +               {
  214. +                       player.sendMessage("You are in jail...daah");
  215. +                       return false;
  216. +               }
  217. +               if(player.isInOlympiadMode())
  218. +               {
  219. +                       player.sendMessage("You are in olympiad mode");
  220. +                       return false;
  221. +               }
  222. +               return true;
  223. +       }
  224. +      
  225. +       @Override
  226. +       public String[] getVoicedCommandList()
  227. +       {
  228. +               return VOICED_COMMANDS;
  229. +       }
  230. + }
  231. \ No newline at end of file
  232. Index: head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java
  233. ===================================================================
  234. --- head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java        (revision 0)
  235. +++ head-src/com/l2jfrozen/gameserver/model/entity/event/CastleWars.java        (working copy)
  236. @@ -0,0 +1,261 @@
  237. + /*
  238. +  * This program is free software: you can redistribute it and/or modify it under
  239. +  * the terms of the GNU General Public License as published by the Free Software
  240. +  * Foundation, either version 3 of the License, or (at your option) any later
  241. +  * version.
  242. +  *
  243. +  * This program is distributed in the hope that it will be useful, but WITHOUT
  244. +  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  245. +  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  246. +  * details.
  247. +  *
  248. +  * You should have received a copy of the GNU General Public License along with
  249. +  * this program. If not, see <http://www.gnu.org/licenses/>.
  250. +  */
  251. + /**
  252. +  * @author Boorinio
  253. +  */
  254. + package com.l2jfrozen.gameserver.model.entity.event;
  255. +
  256. + import java.util.List;
  257. +
  258. + import com.l2jfrozen.gameserver.model.entity.Announcements;
  259. + import com.l2jfrozen.gameserver.datatables.csv.DoorTable;
  260. + import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
  261. + import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
  262. + import com.l2jfrozen.gameserver.model.L2World;
  263. + import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance;
  264. + import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  265. + import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
  266. +
  267. + import javolution.util.FastList;
  268. + import javolution.util.FastSet;
  269. +
  270. + public class CastleWars
  271. + {
  272. +       private static List<L2PcInstance> _defenders = new FastList<L2PcInstance>();
  273. +       private static List<L2PcInstance> _attackers = new FastList<L2PcInstance>();
  274. +       private static FastSet<L2NpcInstance> _flags = new FastSet<L2NpcInstance>();
  275. +       public static boolean isFinished;
  276. +       public static boolean CastleRegi;
  277. +       public static boolean isRunning;
  278. +       private static boolean alaksokolies = false;
  279. +       private static int i;
  280. +       public static int flagskilled = 0;
  281. +       public static int defendersx = 77566;
  282. +       public static int defendersy = -152128;
  283. +       public static int defendersz = -545;
  284. +       public static int attackersx = 84303;
  285. +       public static int attackersy = -140727;
  286. +       public static int attackersz = -1568;
  287. +       public static int[] flagslocx =
  288. +       {
  289. +       77545, 76663, 78446,
  290. +       };
  291. +       private static int[] flagslocy =
  292. +       {
  293. +       -149937, -154522, -154524,
  294. +       };
  295. +       private static int[] flagslocz =
  296. +       {
  297. +       345, 128, 235,
  298. +       };
  299. +      
  300. +       public static void openRegi()
  301. +       {
  302. +               Announcements.getInstance().announceToAll("Castle Wars Event has Started!");
  303. +               Announcements.getInstance().announceToAll("Type .join to enter or .leave to leave!");
  304. +               Announcements.getInstance().announceToAll("You have 5 minutes to register!");
  305. +               isRunning = true;
  306. +               isFinished = false;
  307. +               CastleRegi = true;
  308. +               waitSecs(300);
  309. +               stopRegi();
  310. +               preparecastle();
  311. +               shufflePlayers();
  312. +               teleportThem();
  313. +               Announcements.getInstance().announceToAll("You have 10 minutes till the event is finished!");
  314. +               waitSecs(600);
  315. +               if (!isFinished)
  316. +               {
  317. +                       defendersWin();
  318. +                      
  319. +               }
  320. +              
  321. +       }
  322. +      
  323. +       public static void preparecastle()
  324. +       {
  325. +               DoorTable.getInstance().getDoor(22130001).openMe();
  326. +               DoorTable.getInstance().getDoor(22130002).openMe();
  327. +               DoorTable.getInstance().getDoor(22130003).openMe();
  328. +               DoorTable.getInstance().getDoor(22130004).openMe();
  329. +               DoorTable.getInstance().getDoor(22130005).openMe();
  330. +               DoorTable.getInstance().getDoor(22130010).openMe();
  331. +               DoorTable.getInstance().getDoor(22130007).openMe();
  332. +               DoorTable.getInstance().getDoor(22130011).openMe();
  333. +               DoorTable.getInstance().getDoor(22130009).openMe();
  334. +               DoorTable.getInstance().getDoor(22130008).openMe();
  335. +               DoorTable.getInstance().getDoor(22130010).openMe();
  336. +               DoorTable.getInstance().getDoor(22130006).openMe();
  337. +               L2NpcInstance flags = null;
  338. +               for (i = 0; i < 3; i++)
  339. +               {
  340. +                       flags = addSpawn(36006, flagslocx, flagslocy, flagslocz);
+                       _flags.add(flags);
+               }
+       }
+      
+       public static void cleanevent()
+       {
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.getAppearance().setNameColor(0xFFFFFF);
+                       defender.setTitle("");
+                       defender.broadcastUserInfo();
+                       defender.teleToLocation(82724, 148307, -3469);
+                       defender.isinCastleWars = false;
+                       defender.isDefender=false;
+               }
+               for (L2PcInstance attacker : _attackers)
+               {
+                       attacker.getAppearance().setNameColor(0xFFFFFF);
+                       attacker.setTitle("");
+                       attacker.broadcastUserInfo();
+                       attacker.teleToLocation(82724, 148307, -3469);
+                       attacker.isinCastleWars = false;
+                       attacker.isAttacker=false;
+               }
+               for (L2NpcInstance flags : _flags)
+               {
+                       flags.deleteMe();
+                      
+               }
+               flagskilled = 0;
+               _flags.clear();
+               _defenders.clear();
+               _attackers.clear();
+               DoorTable.getInstance().getDoor(22130001).closeMe();
+               DoorTable.getInstance().getDoor(22130002).closeMe();
+               DoorTable.getInstance().getDoor(22130003).closeMe();
+               DoorTable.getInstance().getDoor(22130004).closeMe();
+               DoorTable.getInstance().getDoor(22130005).closeMe();
+               DoorTable.getInstance().getDoor(22130010).closeMe();
+               DoorTable.getInstance().getDoor(22130007).closeMe();
+               DoorTable.getInstance().getDoor(22130011).closeMe();
+               DoorTable.getInstance().getDoor(22130009).closeMe();
+               DoorTable.getInstance().getDoor(22130008).closeMe();
+               DoorTable.getInstance().getDoor(22130010).closeMe();
+               DoorTable.getInstance().getDoor(22130006).closeMe();
+       }
+      
+       public static void defendersWin()
+       {
+               Announcements.getInstance().announceToAll("Defenders Won the event they protected the flags!");
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.sendMessage("Congratulations! Here is a reward for your effort!");
+                       defender.addItem("Reward", 3470, 1, defender, true);
+               }
+               isFinished = true;
+               cleanevent();
+       }
+      
+       public static void attackersWin()
+       {
+               if (flagskilled == 3)
+               {
+                       Announcements.getInstance().announceToAll("Attackers Won the event they killed all the flags!");
+                       for (L2PcInstance attacker : _attackers)
+                       {
+                               attacker.sendMessage("Congratulations! Here is a reward for your effort!");
+                               attacker.addItem("Reward", 3470, 1, attacker, true);
+                       }
+                       isFinished = true;
+                       cleanevent();
+               }
+       }
+      
+       public static void teleportThem()
+       {
+               for (L2PcInstance defender : _defenders)
+               {
+                       defender.teleToLocation(defendersx, defendersy, defendersz);
+               }
+               for (L2PcInstance attacker : _attackers)
+               {
+                       attacker.teleToLocation(attackersx, attackersy, attackersz);
+               }
+       }
+      
+       public static void stopRegi()
+       {
+               Announcements.getInstance().announceToAll("Registrations are now over!");
+               CastleRegi = false;
+       }
+      
+       public static void shufflePlayers()
+       {
+               for (L2PcInstance player : L2World.getInstance().getAllPlayers())
+               {
+                       if (player.isinCastleWars)
+                       {
+                               if (alaksokolies)
+                               {
+                                       _defenders.add(player);
+                                       player.getAppearance().setNameColor(0xFF0000);
+                                       player.setTitle("Defender");
+                                       player.broadcastUserInfo();
+                                       player.isDefender=true;
+                                       alaksokolies = false;
+                               }
+                               else
+                               {
+                                       _attackers.add(player);
+                                       player.getAppearance().setNameColor(0x0000FF);
+                                       player.setTitle("Attacker");
+                                       player.broadcastUserInfo();
+                                       player.isAttacker=true;
+                                       alaksokolies = true;
+                               }
+                       }
+               }
+       }
+      
+       public static void waitSecs(int i)
+       {
+               try
+               {
+                       Thread.sleep(i * 1000);
+               }
+               catch (InterruptedException ie)
+               {
+                       ie.printStackTrace();
+               }
+       }
+      
+       private static L2NpcInstance addSpawn(int npcId, int x, int y, int z)
+       {
+               L2NpcInstance result = null;
+               try
+               {
+                       L2NpcTemplate template = NpcTable.getInstance().getTemplate(npcId);
+                       if (template != null)
+                       {
+                               L2Spawn spawn = new L2Spawn(template);
+                               spawn.setInstanceId(0);
+                               spawn.setHeading(1);
+                               spawn.setLocx(x);
+                               spawn.setLocy(y);
+                               spawn.setLocz(z);
+                               spawn.stopRespawn();
+                               result = spawn.spawnOne();
+                               return result;
+                       }
+               }
+               catch (Exception e1)
+               {
+               }
+               return null;
+       }
+ }
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminCastlewars.java (working copy)
@@ -0,0 +1,52 @@
+/*
+ * 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.admincommandhandlers;
+
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.model.entity.event.CastleWars;
+
+
+public class AdminCastlewars implements IAdminCommandHandler
+{
+
+       private static final String[] ADMIN_COMMANDS =
+       {
+               "admin_castlewars"
+       };
+      
+        @SuppressWarnings("unused")
+       private enum CommandEnum
+        {
+                admin_castlewars
+        }
+      
+       @Override
+       public boolean useAdminCommand(String command, L2PcInstance activeChar)
+       {
+               if (command.equals("admin_castlewars"))
+              
+               CastleWars.openRegi();
+              
+               return true;
+       }
+      
+       @Override
+       public String[] getAdminCommandList()
+       {
+               return ADMIN_COMMANDS;
+       }
+      
+      
+       }
\ No newline at end of file
Index: l2jfrozen/data/html/CastleTutorial.htm
===================================================================
--- l2jfrozen/data/html/CastleTutorial.htm      (revision 0)
+++ l2jfrozen/data/html/CastleTutorial.htm      (revision 0)
@@ -0,0 +1,14 @@
+<html><title>CastleWars Tutorial</title><body>Jail:<br>
+Once the Event starts:<br>
+-If you are a defender:<br>
+You need to defend all of the castle's flags<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you succeed for 10 minutes you win the event<br>
+<br>
+-If you are an attacker:
+You need to kill all the flags in the castle<br>
+2 in the artifact's rooms<br>
+1 on the roof top<br>
+If you kill all 3 flags the event ends!<br>
+</body></html>
\ No newline at end of file
Index: l2jfrozen/sql/game/npc.sql
===================================================================
--- l2jfrozen/sql/game/npc.sql  (revision 189)
+++ l2jfrozen/sql/game/npc.sql  (working copy)
@@ -6608,7 +6608,8 @@
        (36002,29022,'Zaken',0,'',0,'Monster.zaken',16.00,32.00,60,'male','L2GrandBoss',40,858518,1975,799.68,2.45,60,57,73,76,70,80,4879745,423589,7273,2951,19762,1197,333,0,3819,0,0,0,68,275,NULL,0,1,12,'FULL_PARTY'),
        (36003,29019,'Antharas',0,'',0,'Monster.antaras',300.00,300.00,79,'male','L2GrandBoss',40,13090000,22197,2380.00,265.32,60,57,73,76,70,80,262720918,29116376,13308,8064,28099,1641,333,0,3819,0,0,0,81,301,NULL,0,0,13,'FULL_PARTY'),
        (36004,29028,'Valakas',0,'',0,'Monster2.valakas',190.00,335.00,85,'male','L2GrandBoss',40,16660000,22197,2856.00,265.32,60,57,73,76,70,80,284286178,27215401,14375,7999,36620,1999,333,0,3819,0,0,0,194,486,'valakas_clan',300,0,13,'FULL_PARTY'),
        (36005,29001,'Queen Ant',0,'',0,'Monster.queen_ant',45.00,53.00,40,'female','L2GrandBoss',40,229898,667,495.04,2.14,60,57,73,76,70,80,2179535,140740,329,1615,77,655,278,0,3819,0,0,0,129,372,'queen_ant_clan',1000,0,0,'LAST_HIT'),
+       (36006,35062,'CaptureFlag',0,'',0,'Deco.flag_a',21.00,82.00,1,'etc','L2Monster',80,700000,989,3.16,0.91,40,43,30,21,20,10,0,0,652,753,358,295,423,0,333,0,0,0,55,132,NULL,0,1,0,'LAST_HIT');
RAW Paste Data
 
 

 

Olha meu amigo coloquei esse mesmo código ai, ta compilando normal na frozen, não precisou mexer em nada não, faz o seguinte você sabe add java mods ? Se sim, Tira tudo que você colocou la e e faz novamente com calma e atenção que da certo, eu testei aqui o mesmo código ta de boa..

Só que tem um porem você vai ter que fazer um teste porque eu acho que quando inicia o evento o char do ADM trava, o bluur tá explicando la no post do código como que arruma isso, da uma olhada mano.

 

Editado por GianT
edit

Flying_Birds_zps9a0601a7.gif

Link para o comentário
Compartilhar em outros sites

  • 0
16 horas atrás, GianT disse:

Olha meu amigo coloquei esse mesmo código ai, ta compilando normal na frozen, não precisou mexer em nada não, faz o seguinte você sabe add java mods ? Se sim, Tira tudo que você colocou la e e faz novamente com calma e atenção que da certo, eu testei aqui o mesmo código ta de boa..

Só que tem um porem você vai ter que fazer um teste porque eu acho que quando inicia o evento o char do ADM trava, o bluur tá explicando la no post do código como que arruma isso, da uma olhada mano.

 

Amigo, eu reinstalei todo os programas novamente junto com o Eclipse e tal, e "Compilei" a Rev L2JFrozen sem ADD nem um mod só pra testar se o problema poderia ser os programas néh? E compilou certinho tudo 100%.

Mas quando abro o novo GameServer dela começa carregar tudo certinho e aparece esse error, e fica repetindo essa mensagem sem parar e não liga o server:

duOF0YH.png

Parece ser um error referente a um NPC com aquele ID? O que não faz sentido nem um porque esse NPC é um Guarda lá de Dark Elven village que nunca foi mechido.

OBS: Eu estou usando  o "Backup" do meu pré configurado no Navicat MySQL, é correto? ou tenho que por um limpo?

Se eu tenho que por um limpo, sabe algum tutorial que me ensina fazer um "Backup" do zero para L2JFrozen? Obrigada. :)

 

spacer.png

Link para o comentário
Compartilhar em outros sites

  • 0
1 hora atrás, Psiu disse:

 

 

O Código do mod ta funcionando, tu que tá colocando errado ok? Tu ta mexendo em código que não tem nada aver!!

Aconselho tu olhar alguns videos tutoriais de java lá na área certa.

Só que o mod castle wars tá com um erro que quando inicia o evento o char do adm fica travado, ai tu tem que ir la no post original que os caras ta explicando como que arruma mano.

Vê ai o mod funcionando (evento iniciou  e o char adm travou)

[img

fRd518U.jpg][/img]

 

Flying_Birds_zps9a0601a7.gif

Link para o comentário
Compartilhar em outros sites

  • 0

Olha, dos 23 erros consegui resolver 21. Só tem 2 agora, e o motivo é esse CastleWar.Java e não sei mais oque fazer para resolver.

lTArsFs.png

O que estou fazendo de errado?? Ali nas linha aparece varis erros, mais eu apenas copiei e colei certinho conforme dizia no código... 

Editado por Psiu
Escrevi errado

spacer.png

Link para o comentário
Compartilhar em outros sites

  • 0
2 horas atrás, GianT disse:

 

O Código do mod ta funcionando, tu que tá colocando errado ok? Tu ta mexendo em código que não tem nada aver!!

Aconselho tu olhar alguns videos tutoriais de java lá na área certa.

Só que o mod castle wars tá com um erro que quando inicia o evento o char do adm fica travado, ai tu tem que ir la no post original que os caras ta explicando como que arruma mano.

Vê ai o mod funcionando (evento iniciou  e o char adm travou)

 

  Mostrar conteúdo oculto

[img

fRd518U.jpg][/img]

 

 

Olha isso, tinha só dois erros como postei acima, ai consegui resolver eles, corrigir tudo certinho. Ai fui compilar apareceu + de 100 erros que não fazem o menor sentido, pois nunca cliquei na quelas áreas, não tem logica isso, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa vontade de chora dps dessa

4vT9pB9.png

spacer.png

Link para o comentário
Compartilhar em outros sites

  • 0
8 horas atrás, Psiu disse:

 

Caramba eim! Que dificuldade já te disse, retira o mod completo e coloca novamente porque o problema tá é no modo que tu ta colocando eu testei esse code e ta ok.

Presta atenção nos caminhos que o mod manda criar os arquivos, não tem erro o código ta limpo.

Flying_Birds_zps9a0601a7.gif

Link para o comentário
Compartilhar em outros sites

  • 0

Pelo que eu vi em uma das imagens que você postou foi que você estava adicionando a linha do caminho usado na diff dentro do arquivo java.

Esta primeira linha "head-src/com.............." serve para que o aplicativo que for aplicar a diff saiba em qual caminho deve enviar o código. No eclipse você pode encontrar esse caminho clicando com o botão direito sobre o projeto e indo nas opções: "Team > Aplly Patch".

Mas antes de fazer isso você deve preparar a diff com os caminhos corretos, estes caminhos são essas linhas: "head-src/com.............."

Prepara eles certinho que você não vai ter mais esses caminhões de erros quando adicionar alguma coisa.

Link para o comentário
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





  • Patrocinadores

  • Quem Está Navegando

    • Nenhum usuário registrado visualizando esta página.
  • Posts

    • Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?    
    • muchas gracias muy lindos NPC 🙂
    • relaxa jovem gafanhoto, testa as quests. e posTa os erros indesejaveis.  
    • Se alguém pudesse me ensinar como codificar as missões, eu ficaria feliz em fazer isso sozinho ou pelo menos ajudar. Eu realmente quero jogar em um servidor onde todas as quests funcionem bem e melhor ainda se você puder fazer quests customizadas!
    • mas no interlude, nem todas as quests de class,  vai mostrar onde tem que ir, ate o reborn nao mostrava quando era interlude, só mostrou depois que eles colocaram client classic pra rodar, e ficou melhor ainda quando virou hellbound em diante, mas ha sim alguma chance de modificar isso direto no script para fazer igualmente, só basta te um pouco de paciencia e persistencia exato
    • 408_PathToElvenwizard dá Orion eu tive que mexer tbm, até modifiquei e consegui deixar ela igual do Classic, com a seta e a marcação no mapa. (não retail IL) Dá pra importar py de várias revs, o foda é que não da regular as quest py através do debug em tempo real, pelo menos eu não consegui rsrs
    • Hasta el momento todas las QUESTS son completables si te guias con un tutorial de youtube. El problema es que tienen bugs de locacion y de subquests que no avanzan o no te marcan correctamente a donde ir en el mapa, cosa que en Retail si se ve como corresponde.
    • estranho, mas pelo menos a galera nunca reclamo das quests quando tinha aberto 5x, geral fez class primeira e segunda job, poucos que compraram a class
    • en RUSaCis-3.5 data pack, las Quests estan en formato .java y son diferentes a como estan redactadas en jOrion y jFrozen 1.5 (ProyectX) package net.sf.l2j.gameserver.scripting.quest; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.enums.Paperdoll; import net.sf.l2j.gameserver.enums.QuestStatus; import net.sf.l2j.gameserver.enums.actors.ClassId; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.network.serverpackets.SocialAction; import net.sf.l2j.gameserver.scripting.QuestState; public class Q224_TestOfSagittarius extends SecondClassQuest { private static final String QUEST_NAME = "Q224_TestOfSagittarius"; // Items private static final int BERNARD_INTRODUCTION = 3294; private static final int HAMIL_LETTER_1 = 3295; private static final int HAMIL_LETTER_2 = 3296; private static final int HAMIL_LETTER_3 = 3297; private static final int HUNTER_RUNE_1 = 3298; private static final int HUNTER_RUNE_2 = 3299; private static final int TALISMAN_OF_KADESH = 3300; private static final int TALISMAN_OF_SNAKE = 3301; private static final int MITHRIL_CLIP = 3302; private static final int STAKATO_CHITIN = 3303; private static final int REINFORCED_BOWSTRING = 3304; private static final int MANASHEN_HORN = 3305; private static final int BLOOD_OF_LIZARDMAN = 3306; private static final int CRESCENT_MOON_BOW = 3028; private static final int WOODEN_ARROW = 17; // Rewards private static final int MARK_OF_SAGITTARIUS = 3293; // NPCs private static final int BERNARD = 30702; private static final int HAMIL = 30626; private static final int SIR_ARON_TANFORD = 30653; private static final int VOKIAN = 30514; private static final int GAUEN = 30717; // Monsters private static final int ANT = 20079; private static final int ANT_CAPTAIN = 20080; private static final int ANT_OVERSEER = 20081; private static final int ANT_RECRUIT = 20082; private static final int ANT_PATROL = 20084; private static final int ANT_GUARD = 20086; private static final int NOBLE_ANT = 20089; private static final int NOBLE_ANT_LEADER = 20090; private static final int BREKA_ORC_SHAMAN = 20269; private static final int BREKA_ORC_OVERLORD = 20270; private static final int MARSH_STAKATO_WORKER = 20230; private static final int MARSH_STAKATO_SOLDIER = 20232; private static final int MARSH_STAKATO_DRONE = 20234; private static final int MARSH_SPIDER = 20233; private static final int ROAD_SCAVENGER = 20551; private static final int MANASHEN_GARGOYLE = 20563; private static final int LETO_LIZARDMAN = 20577; private static final int LETO_LIZARDMAN_ARCHER = 20578; private static final int LETO_LIZARDMAN_SOLDIER = 20579; private static final int LETO_LIZARDMAN_WARRIOR = 20580; private static final int LETO_LIZARDMAN_SHAMAN = 20581; private static final int LETO_LIZARDMAN_OVERLORD = 20582; private static final int SERPENT_DEMON_KADESH = 27090; public Q224_TestOfSagittarius() { super(224, "Test Of Sagittarius"); setItemsIds(BERNARD_INTRODUCTION, HAMIL_LETTER_1, HAMIL_LETTER_2, HAMIL_LETTER_3, HUNTER_RUNE_1, HUNTER_RUNE_2, TALISMAN_OF_KADESH, TALISMAN_OF_SNAKE, MITHRIL_CLIP, STAKATO_CHITIN, REINFORCED_BOWSTRING, MANASHEN_HORN, BLOOD_OF_LIZARDMAN, CRESCENT_MOON_BOW); addQuestStart(BERNARD); addTalkId(BERNARD, HAMIL, SIR_ARON_TANFORD, VOKIAN, GAUEN); addMyDying(ANT, ANT_CAPTAIN, ANT_OVERSEER, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, NOBLE_ANT, NOBLE_ANT_LEADER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, MARSH_SPIDER, ROAD_SCAVENGER, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, SERPENT_DEMON_KADESH); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; // BERNARD if (event.equalsIgnoreCase("30702-04.htm")) { st.setState(QuestStatus.STARTED); st.setCond(1); playSound(player, SOUND_ACCEPT); giveItems(player, BERNARD_INTRODUCTION, 1); if (giveDimensionalDiamonds39(player)) htmltext = "30702-04a.htm"; } // HAMIL else if (event.equalsIgnoreCase("30626-03.htm")) { st.setCond(2); playSound(player, SOUND_MIDDLE); takeItems(player, BERNARD_INTRODUCTION, 1); giveItems(player, HAMIL_LETTER_1, 1); } else if (event.equalsIgnoreCase("30626-07.htm")) { st.setCond(5); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_1, 10); giveItems(player, HAMIL_LETTER_2, 1); } // SIR_ARON_TANFORD else if (event.equalsIgnoreCase("30653-02.htm")) { st.setCond(3); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_1, 1); } // VOKIAN else if (event.equalsIgnoreCase("30514-02.htm")) { st.setCond(6); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_2, 1); } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; switch (st.getState()) { case CREATED: if (player.getClassId() != ClassId.ROGUE && player.getClassId() != ClassId.ELVEN_SCOUT && player.getClassId() != ClassId.ASSASSIN) htmltext = "30702-02.htm"; else if (player.getStatus().getLevel() < 39) htmltext = "30702-01.htm"; else htmltext = "30702-03.htm"; break; case STARTED: int cond = st.getCond(); switch (npc.getNpcId()) { case BERNARD: htmltext = "30702-05.htm"; break; case HAMIL: if (cond == 1) htmltext = "30626-01.htm"; else if (cond == 2 || cond == 3) htmltext = "30626-04.htm"; else if (cond == 4) htmltext = "30626-05.htm"; else if (cond > 4 && cond < 8) htmltext = "30626-08.htm"; else if (cond == 8) { htmltext = "30626-09.htm"; st.setCond(9); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_2, 10); giveItems(player, HAMIL_LETTER_3, 1); } else if (cond > 8 && cond < 12) htmltext = "30626-10.htm"; else if (cond == 12) { htmltext = "30626-11.htm"; st.setCond(13); playSound(player, SOUND_MIDDLE); } else if (cond == 13) htmltext = "30626-12.htm"; else if (cond == 14) { htmltext = "30626-13.htm"; takeItems(player, BLOOD_OF_LIZARDMAN, -1); takeItems(player, CRESCENT_MOON_BOW, 1); takeItems(player, TALISMAN_OF_KADESH, 1); giveItems(player, MARK_OF_SAGITTARIUS, 1); rewardExpAndSp(player, 54726, 20250); player.broadcastPacket(new SocialAction(player, 3)); playSound(player, SOUND_FINISH); st.exitQuest(false); } break; case SIR_ARON_TANFORD: if (cond == 2) htmltext = "30653-01.htm"; else if (cond > 2) htmltext = "30653-03.htm"; break; case VOKIAN: if (cond == 5) htmltext = "30514-01.htm"; else if (cond == 6) htmltext = "30514-03.htm"; else if (cond == 7) { htmltext = "30514-04.htm"; st.setCond(8); playSound(player, SOUND_MIDDLE); takeItems(player, TALISMAN_OF_SNAKE, 1); } else if (cond > 7) htmltext = "30514-05.htm"; break; case GAUEN: if (cond == 9) { htmltext = "30717-01.htm"; st.setCond(10); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_3, 1); } else if (cond == 10) htmltext = "30717-03.htm"; else if (cond == 11) { htmltext = "30717-02.htm"; st.setCond(12); playSound(player, SOUND_MIDDLE); takeItems(player, MANASHEN_HORN, 1); takeItems(player, MITHRIL_CLIP, 1); takeItems(player, REINFORCED_BOWSTRING, 1); takeItems(player, STAKATO_CHITIN, 1); giveItems(player, CRESCENT_MOON_BOW, 1); giveItems(player, WOODEN_ARROW, 10); } else if (cond > 11) htmltext = "30717-04.htm"; break; } break; case COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public void onMyDying(Npc npc, Creature killer) { final Player player = killer.getActingPlayer(); final QuestState st = checkPlayerState(player, npc, QuestStatus.STARTED); if (st == null) return; switch (npc.getNpcId()) { case ANT: case ANT_CAPTAIN: case ANT_OVERSEER: case ANT_RECRUIT: case ANT_PATROL: case ANT_GUARD: case NOBLE_ANT: case NOBLE_ANT_LEADER: if (st.getCond() == 3 && dropItems(player, HUNTER_RUNE_1, 1, 10, 500000)) st.setCond(4); break; case BREKA_ORC_SHAMAN: case BREKA_ORC_OVERLORD: if (st.getCond() == 6 && dropItems(player, HUNTER_RUNE_2, 1, 10, 500000)) { st.setCond(7); giveItems(player, TALISMAN_OF_SNAKE, 1); } break; case MARSH_STAKATO_WORKER: case MARSH_STAKATO_SOLDIER: case MARSH_STAKATO_DRONE: if (st.getCond() == 10 && dropItems(player, STAKATO_CHITIN, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING)) st.setCond(11); break; case MARSH_SPIDER: if (st.getCond() == 10 && dropItems(player, REINFORCED_BOWSTRING, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case ROAD_SCAVENGER: if (st.getCond() == 10 && dropItems(player, MITHRIL_CLIP, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN)) st.setCond(11); break; case MANASHEN_GARGOYLE: if (st.getCond() == 10 && dropItems(player, MANASHEN_HORN, 1, 1, 100000) && player.getInventory().hasItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case LETO_LIZARDMAN: case LETO_LIZARDMAN_ARCHER: case LETO_LIZARDMAN_SOLDIER: case LETO_LIZARDMAN_WARRIOR: case LETO_LIZARDMAN_SHAMAN: case LETO_LIZARDMAN_OVERLORD: if (st.getCond() == 13) { if (((player.getInventory().getItemCount(BLOOD_OF_LIZARDMAN) - 120) * 5) > Rnd.get(100)) { playSound(player, SOUND_BEFORE_BATTLE); takeItems(player, BLOOD_OF_LIZARDMAN, -1); addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } else dropItemsAlways(player, BLOOD_OF_LIZARDMAN, 1, 0); } break; case SERPENT_DEMON_KADESH: if (st.getCond() == 13) { if (player.getInventory().getItemIdFrom(Paperdoll.RHAND) == CRESCENT_MOON_BOW) { st.setCond(14); playSound(player, SOUND_MIDDLE); giveItems(player, TALISMAN_OF_KADESH, 1); } else addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } break; } } }  
×
×
  • Criar Novo...

Important Information

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.