Advertisement
Elfocrash

Elfocrash pin code system

May 30th, 2013
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 43.20 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P acis
  3. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  4. ===================================================================
  5. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 38)
  6. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
  7. @@ -2200,6 +2200,124 @@
  8.                 else
  9.                     activeChar.sendMessage("12 hours have to pass till you are able to vote again.");
  10.             }
  11. +           else if (_command.startsWith("submitpin"))
  12. +           {
  13. +               try
  14. +               {
  15. +               String value = _command.substring(9);
  16. +               StringTokenizer s = new StringTokenizer(value," ");
  17. +               int _pin = activeChar.getPin();
  18. +              
  19. +
  20. +               try
  21. +               {
  22. +                   if(activeChar.getPincheck())
  23. +                   {
  24. +                   _pin = Integer.parseInt(s.nextToken());
  25. +                  
  26. +                  
  27. +                  
  28. +                   if(Integer.toString(_pin).length() != 4)
  29. +                   {
  30. +                       activeChar.sendMessage("You have to fill the pin box with 4 numbers.Not more, not less.");
  31. +                       return;
  32. +                   }
  33. +                  
  34. +                   Connection con = null;
  35. +                   try
  36. +                   {
  37. +                       con = L2DatabaseFactory.getInstance().getConnection();
  38. +                       PreparedStatement statement = con.prepareStatement("UPDATE characters SET pin=? WHERE obj_id=?");
  39. +
  40. +                       statement.setInt(1, _pin);
  41. +                       statement.setInt(2, activeChar.getObjectId());
  42. +                       statement.execute();
  43. +                       statement.close();
  44. +                       activeChar.setPincheck(false);
  45. +                       activeChar.updatePincheck();
  46. +                       activeChar.sendMessage("You successfully submitted your pin code.You will need it in order to login.");
  47. +                       activeChar.sendMessage("Your Pin Code is: " + _pin );
  48. +                   }
  49. +                   catch(Exception e)
  50. +                   {
  51. +                           e.printStackTrace();
  52. +                       _log.warning("could not set char first login:" + e);
  53. +                   }
  54. +                   finally
  55. +                   {
  56. +                       L2DatabaseFactory.close(con);
  57. +                   }  
  58. +                   }
  59. +               }
  60. +               catch(Exception e)
  61. +               {
  62. +                   activeChar.sendMessage("The Pin Code must be 4 numbers.");
  63. +               }
  64. +               }
  65. +               catch(Exception e)
  66. +               {
  67. +                   activeChar.sendMessage("The Pin Code must be 4 numbers.");
  68. +               }
  69. +              
  70. +           }
  71. +           else if(_command.startsWith("enterpin"))
  72. +           {
  73. +               try
  74. +               {
  75. +                   String value = _command.substring(8);
  76. +                   StringTokenizer s = new StringTokenizer(value," ");
  77. +                   int dapin = 0;
  78. +                   int pin = 0;
  79. +                  
  80. +                   dapin = Integer.parseInt(s.nextToken());               
  81. +                  
  82. +                   Connection con = null;
  83. +                   PreparedStatement statement = null;
  84. +                   try
  85. +                   {
  86. +                       con = L2DatabaseFactory.getInstance().getConnection();
  87. +                      
  88. +                       statement = con.prepareStatement("SELECT pin FROM characters WHERE obj_Id=?");
  89. +                       statement.setInt(1, activeChar.getObjectId());
  90. +                      
  91. +                       ResultSet rset = statement.executeQuery();
  92. +  
  93. +                       while (rset.next())
  94. +                       {
  95. +                           pin = rset.getInt("pin");
  96. +                       }
  97. +                      
  98. +                       if(pin == dapin)
  99. +                       {
  100. +                           activeChar.sendMessage("Pin Code Authenticated Successfully.You are now free to move.");
  101. +                           activeChar.setIsImmobilized(false);
  102. +                       }
  103. +                       else
  104. +                       {
  105. +                           activeChar.sendMessage("Pin Code does not match with the submitted one.You will now get disconnected!");
  106. +                           waitS(2);
  107. +                           activeChar.logout();
  108. +                       }
  109. +                   }
  110. +                   catch (Exception e)
  111. +                   {
  112. +                  
  113. +                       activeChar.sendMessage("The Pin Code must be 4 numbers.");
  114. +                   }
  115. +                   finally
  116. +                   {
  117. +                       L2DatabaseFactory.close(con);
  118. +                   }
  119. +               }
  120. +           catch (Exception e)
  121. +           {
  122. +               //e.printStackTrace();
  123. +               activeChar.sendMessage("The Pin Code MUST be 4 numbers.");
  124. +           }
  125. +              
  126. +
  127. +              
  128. +           }
  129.             else if (_command.startsWith("votereward1"))
  130.             {
  131.                 activeChar.addItem("reward", Config.VOTE_REWARD_ID1, Config.VOTE_REWARD_AMOUNT1, activeChar, true);
  132. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
  133. ===================================================================
  134. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (revision 28)
  135. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (working copy)
  136. @@ -429,6 +429,44 @@
  137.        
  138. +       if(!activeChar.getPincheck())
  139. +       {
  140. +              activeChar.setIsImmobilized(true);
  141. +              TextBuilder tb = new TextBuilder();
  142. +              NpcHtmlMessage html = new NpcHtmlMessage(1);
  143. +                      
  144. +              tb.append("<html><head><title>Character Pin Panel</title></head>");
  145. +              tb.append("<body>");      
  146. +              tb.append("<center>");
  147. +              tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  148. +              tb.append("<tr>");
  149. +              tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  150. +              tb.append("<td valign=\"top\"><font color=\"FF6600\">Pin Panel</font>");
  151. +              tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this interface to enable pin secirity.</td></tr></table></center>");
  152. +              tb.append("<center>");
  153. +              tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>");
  154. +              tb.append("</center>");
  155. +              tb.append("<table width=\"350\" cellpadding=\"5\" bgcolor=\"000000\">");
  156. +              tb.append("<tr>");
  157. +              tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"Icon.etc_old_key_i02\" width=\"32\" height=\"32\"></td>");
  158. +              tb.append("<td valign=\"top\">Please enter your PIN:<edit var=\"dapin\" width=80 height=15>");
  159. +              tb.append("<br1>info or something (can delete)</td>");
  160. +              tb.append("</tr>");
  161. +              tb.append("</table>");
  162. +              tb.append("<br>");
  163. +              tb.append("<center>");
  164. +              tb.append("<button value=\"Submit\" action=\"bypass -h enterpin $dapin\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
  165. +              tb.append("</center>");
  166. +              tb.append("<center>");
  167. +              tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
  168. +              tb.append("<font color=\"FF6600\">By Elfocrash</font>");
  169. +              tb.append("</center>");
  170. +              tb.append("</body></html>");
  171. +                      
  172. +              html.setHtml(tb.toString());
  173. +              activeChar.sendPacket(html);
  174. +       }
  175. +      
  176.         PetitionManager.getInstance().checkPetitionMessages(activeChar);
  177.        
  178.         // no broadcast needed since the player will already spawn dead to others
  179. Index: aCis_datapack/sql/pinsystemtables.sql
  180. ===================================================================
  181. --- aCis_datapack/sql/pinsystemtables.sql   (revision 0)
  182. +++ aCis_datapack/sql/pinsystemtables.sql   (revision 0)
  183. @@ -0,0 +1,2 @@
  184. +ALTER TABLE `characters` ADD `pin` int(4) DEFAULT NULL;
  185. +ALTER TABLE `characters` ADD `pinsubmited` int(4) DEFAULT 1;
  186. \ No newline at end of file
  187. Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  188. ===================================================================
  189. --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (revision 38)
  190. +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java   (working copy)
  191. @@ -256,7 +256,7 @@
  192.     // Character SQL String Definitions:
  193.     private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,nobless,power_grade,last_recom_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  194.     private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE obj_id=?";
  195. -   private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,first_log,lastVoteHopzone,lastVoteTopzone FROM characters WHERE obj_id=?";
  196. +   private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,first_log,lastVoteHopzone,lastVoteTopzone,pinsubmited,pin FROM characters WHERE obj_id=?";
  197.    
  198.     // Character Subclass SQL String Definitions:
  199.     private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
  200. @@ -382,7 +382,8 @@
  201.     private int _charId = 0x00030b7a;
  202.    
  203.     private boolean _first_log;
  204. -  
  205. +   public boolean _pincheck;
  206. +   public int _pin;
  207.     private int killcounttillenchant = 0;
  208.    
  209.     private long _expBeforeDeath;
  210. @@ -6487,6 +6488,35 @@
  211.         return _first_log;
  212.     }
  213.    
  214. +   public void setPincheck(boolean pincheck)
  215. +   {
  216. +       _pincheck = pincheck;
  217. +   }
  218. +  
  219. +   public void setPincheck(int pincheck)
  220. +   {
  221. +       _pincheck = false;
  222. +       if(pincheck == 1)
  223. +       {
  224. +           _pincheck = true;
  225. +       }
  226. +   }
  227. +  
  228. +   public boolean getPincheck()
  229. +   {
  230. +       return _pincheck;
  231. +   }
  232. +  
  233. +   public void setPin(int pin)
  234. +   {
  235. +       _pin = pin;
  236. +   }
  237. +  
  238. +   public int getPin()
  239. +   {
  240. +       return _pin;
  241. +   }
  242. +  
  243.     /**
  244.      * Return True if the L2PcInstance is a GM.
  245.      */
  246. @@ -6717,6 +6749,40 @@
  247.         }
  248.     }
  249.    
  250. +   public void updatePincheck()
  251. +   {
  252. +       Connection con = null;
  253. +       try
  254. +       {
  255. +           con = L2DatabaseFactory.getInstance().getConnection();
  256. +           PreparedStatement statement = con.prepareStatement("UPDATE characters SET pinsubmited=? WHERE obj_id=?");
  257. +
  258. +
  259. +          
  260. +           int _pin;
  261. +           if(getPincheck())
  262. +           {
  263. +               _pin = 1;
  264. +           }
  265. +           else
  266. +           {
  267. +               _pin = 0;
  268. +           }
  269. +           statement.setInt(1, _pin);
  270. +           statement.setInt(2, getObjectId());
  271. +           statement.execute();
  272. +           statement.close();
  273. +       }
  274. +       catch(Exception e)
  275. +       {
  276. +               e.printStackTrace();
  277. +           _log.warning("could not set char first login:" + e);
  278. +       }
  279. +       finally
  280. +       {
  281. +           L2DatabaseFactory.close(con);
  282. +       }
  283. +   }
  284.    
  285.     /**
  286.      * Create a new player in the characters table of the database.
  287. @@ -6832,6 +6898,8 @@
  288.                
  289.                
  290.                 player.setFirstLog(rset.getInt("first_log"));
  291. +               player.setPincheck(rset.getInt("pinsubmited"));
  292. +               player.setPin(rset.getInt("pin"));
  293.                 player.setKarma(rset.getInt("karma"));
  294.                 player.setPvpKills(rset.getInt("pvpkills"));
  295.                 player.setPkKills(rset.getInt("pkkills"));
  296. Index: aCis_datapack/tools/database_installer.bat
  297. ===================================================================
  298. --- aCis_datapack/tools/database_installer.bat  (revision 37)
  299. +++ aCis_datapack/tools/database_installer.bat  (working copy)
  300. @@ -110,6 +110,7 @@
  301.  %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/seven_signs_status.sql
  302.  %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/siege_clans.sql
  303.  %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/topic.sql
  304. +%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/pinsystemtables.sql
  305.  
  306.  echo Done.
  307.  echo.
  308. Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Pin.java
  309. ===================================================================
  310. --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Pin.java   (revision 0)
  311. +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Pin.java   (revision 0)
  312. @@ -0,0 +1,85 @@
  313. +/*
  314. + * This program is free software: you can redistribute it and/or modify it under
  315. + * the terms of the GNU General Public License as published by the Free Software
  316. + * Foundation, either version 3 of the License, or (at your option) any later
  317. + * version.
  318. + *
  319. + * This program is distributed in the hope that it will be useful, but WITHOUT
  320. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  321. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  322. + * details.
  323. + *
  324. + * You should have received a copy of the GNU General Public License along with
  325. + * this program. If not, see <http://www.gnu.org/licenses/>.
  326. + */
  327. +package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
  328. +
  329. +import javolution.text.TextBuilder;
  330. +
  331. +
  332. +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  333. +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
  334. +import net.sf.l2j.gameserver.model.L2World;
  335. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  336. +
  337. +public class Pin implements IVoicedCommandHandler
  338. +{
  339. +   private static String[] _voicedCommands =
  340. +   {
  341. +       "pincode"
  342. +   };
  343. +
  344. +   @Override
  345. +   public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  346. +   {
  347. +       if(command.equalsIgnoreCase("pincode"))
  348. +       {
  349. +           if(activeChar.getPincheck())
  350. +           {
  351. +                  TextBuilder tb = new TextBuilder();
  352. +                  NpcHtmlMessage html = new NpcHtmlMessage(1);
  353. +                          
  354. +                  tb.append("<html><head><title>Character Pin Panel</title></head>");
  355. +                  tb.append("<body>");      
  356. +                  tb.append("<center>");
  357. +                  tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  358. +                  tb.append("<tr>");
  359. +                  tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  360. +                  tb.append("<td valign=\"top\"><font color=\"FF6600\">Pin Panel</font>");
  361. +                  tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this interface to enable pin secirity.</td></tr></table></center>");
  362. +                  tb.append("<center>");
  363. +                  tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>");
  364. +                  tb.append("</center>");
  365. +                      tb.append("<table width=\"350\" cellpadding=\"5\" bgcolor=\"000000\">");
  366. +                      tb.append("<tr>");
  367. +                  tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"Icon.etc_old_key_i02\" width=\"32\" height=\"32\"></td>");
  368. +                  tb.append("<td valign=\"top\">Please enter your PIN:<edit var=\"pin\" width=80 height=15>");
  369. +                  tb.append("<br1>info or something (can delete)</td>");
  370. +                  tb.append("</tr>");
  371. +                  tb.append("</table>");
  372. +                  tb.append("<br>");
  373. +                  tb.append("<center>");
  374. +                  tb.append("<button value=\"Submit\" action=\"bypass -h submitpin $pin\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
  375. +                  tb.append("</center>");
  376. +                  tb.append("<center>");
  377. +                  tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
  378. +                  tb.append("<font color=\"FF6600\">By Elfocrash</font>");
  379. +                  tb.append("</center>");
  380. +                  tb.append("</body></html>");
  381. +                          
  382. +                  html.setHtml(tb.toString());
  383. +                  activeChar.sendPacket(html);
  384. +           }
  385. +           else
  386. +               activeChar.sendMessage("You have already submitted a Pin code");
  387. +          
  388. +       }
  389. +       return true;
  390. +   }
  391. +
  392. +   @Override
  393. +   public String[] getVoicedCommandList()
  394. +   {
  395. +       return _voicedCommands;
  396. +   }
  397. +}
  398. Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
  399. ===================================================================
  400. --- aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (revision 28)
  401. +++ aCis_gameserver/java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java    (working copy)
  402. @@ -32,6 +32,7 @@
  403.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Online;
  404.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.StriderRaceCMD;
  405.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.PvpRewardPanel;
  406. +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Pin;
  407.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.ReportToAdmin;
  408.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoicedKino;
  409.  import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VotePanel;
  410. @@ -69,6 +70,7 @@
  411.         registerVoicedCommandHandler(new ReportToAdmin());
  412.         registerVoicedCommandHandler(new StriderRaceCMD());
  413.         registerVoicedCommandHandler(new BuffShopHandler());
  414. +       registerVoicedCommandHandler(new Pin());
  415.        
  416.         if(Config.PVP_REWARD_SYSTEM_ENABLED)
  417.         registerVoicedCommandHandler(new PvpRewardPanel());
  418. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  419. ===================================================================
  420. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 40)
  421. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
  422. @@ -2291,6 +2291,7 @@
  423.                         {
  424.                             activeChar.sendMessage("Pin Code Authenticated Successfully.You are now free to move.");
  425.                             activeChar.setIsImmobilized(false);
  426. +                           activeChar.setIsSubmitingPin(false);
  427.                         }
  428.                         else
  429.                         {
  430. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java
  431. ===================================================================
  432. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java    (revision 40)
  433. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java    (working copy)
  434. @@ -75,6 +75,12 @@
  435.             return;
  436.         }
  437.        
  438. +       if (player.isSubmitingPin())
  439. +       {
  440. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  441. +           return;
  442. +       }
  443. +      
  444.         if (AttackStanceTaskManager.getInstance().getAttackStanceTask(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
  445.         {
  446.             player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  447. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java
  448. ===================================================================
  449. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java  (revision 40)
  450. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeRequest.java  (working copy)
  451. @@ -61,6 +61,12 @@
  452.             return;
  453.         }
  454.        
  455. +       if (player.isSubmitingPin() || target.isSubmitingPin())
  456. +       {
  457. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  458. +           return;
  459. +       }
  460. +      
  461.         // Alt game - Karma punishment
  462.         if (!Config.KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || target.getKarma() > 0))
  463.         {
  464. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java
  465. ===================================================================
  466. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 40)
  467. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (working copy)
  468. @@ -82,6 +82,12 @@
  469.             player.sendPacket(SystemMessageId.ENCHANT_SCROLL_CANCELLED);
  470.         }
  471.        
  472. +       if (player.isSubmitingPin())
  473. +       {
  474. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  475. +           return;
  476. +       }
  477. +      
  478.         final ItemContainer warehouse = player.getActiveWarehouse();
  479.         if (warehouse == null)
  480.             return;
  481. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java
  482. ===================================================================
  483. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java   (revision 40)
  484. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinAlly.java   (working copy)
  485. @@ -45,6 +45,12 @@
  486.             return;
  487.         }
  488.        
  489. +       if (activeChar.isSubmitingPin())
  490. +       {
  491. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  492. +           return;
  493. +       }
  494. +      
  495.         final L2PcInstance target = L2World.getInstance().getPlayer(_id);
  496.         if (target == null)
  497.         {
  498. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java
  499. ===================================================================
  500. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java (revision 40)
  501. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/TradeDone.java (working copy)
  502. @@ -73,6 +73,12 @@
  503.                 return;
  504.             }
  505.            
  506. +           if (player.isSubmitingPin())
  507. +                   {
  508. +                       player.sendMessage("Unable to do any action while PIN is not submitted");
  509. +                       return;
  510. +                   }
  511. +          
  512.             // Sender under enchant process, close it.
  513.             if (owner.getActiveEnchantItem() != null)
  514.             {
  515. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStopPledgeWar.java
  516. ===================================================================
  517. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStopPledgeWar.java  (revision 40)
  518. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStopPledgeWar.java  (working copy)
  519. @@ -51,6 +51,12 @@
  520.             return;
  521.         }
  522.        
  523. +       if (player.isSubmitingPin())
  524. +       {
  525. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  526. +           return;
  527. +       }
  528. +      
  529.         if (!playerClan.isAtWarWith(clan.getClanId()))
  530.         {
  531.             player.sendPacket(SystemMessageId.NOT_INVOLVED_IN_WAR);
  532. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithDrawalParty.java
  533. ===================================================================
  534. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithDrawalParty.java    (revision 40)
  535. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithDrawalParty.java    (working copy)
  536. @@ -40,6 +40,12 @@
  537.         if (party == null)
  538.             return;
  539.        
  540. +       if (player.isSubmitingPin())
  541. +       {
  542. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  543. +           return;
  544. +       }
  545. +      
  546.         if (party.isInDimensionalRift() && !party.getDimensionalRift().getRevivedAtWaitingRoom().contains(player))
  547.             player.sendMessage("You can't exit party when you are in Dimensional Rift.");
  548.         else
  549. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetition.java
  550. ===================================================================
  551. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetition.java   (revision 40)
  552. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPetition.java   (working copy)
  553. @@ -51,6 +51,12 @@
  554.         if (activeChar == null)
  555.             return;
  556.        
  557. +       if (activeChar.isSubmitingPin())
  558. +       {
  559. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  560. +           return;
  561. +       }
  562. +      
  563.         if (!GmListTable.getInstance().isGmOnline(false))
  564.         {
  565.             activeChar.sendPacket(SystemMessageId.NO_GM_PROVIDING_SERVICE_NOW);
  566. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestShowMiniMap.java
  567. ===================================================================
  568. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestShowMiniMap.java    (revision 40)
  569. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestShowMiniMap.java    (working copy)
  570. @@ -31,6 +31,12 @@
  571.         if (activeChar == null)
  572.             return;
  573.        
  574. +       if (activeChar.isSubmitingPin())
  575. +       {
  576. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  577. +           return;
  578. +       }
  579. +      
  580.         activeChar.sendPacket(ShowMiniMap.REGULAR_MAP);
  581.     }
  582.  }
  583. \ No newline at end of file
  584. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java
  585. ===================================================================
  586. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java  (revision 40)
  587. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseDepositList.java  (working copy)
  588. @@ -74,6 +74,12 @@
  589.             return;
  590.         }
  591.        
  592. +       if (player.isSubmitingPin())
  593. +       {
  594. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  595. +           return;
  596. +       }
  597. +      
  598.         if (player.getActiveEnchantItem() != null)
  599.         {
  600.             player.setActiveEnchantItem(null);
  601. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDismissAlly.java
  602. ===================================================================
  603. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDismissAlly.java    (revision 40)
  604. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDismissAlly.java    (working copy)
  605. @@ -31,6 +31,13 @@
  606.         if (activeChar == null)
  607.             return;
  608.        
  609. +       if (activeChar.isSubmitingPin())
  610. +       {
  611. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  612. +           return;
  613. +       }
  614. +      
  615. +      
  616.         if (!activeChar.isClanLeader())
  617.         {
  618.             activeChar.sendPacket(SystemMessageId.FEATURE_ONLY_FOR_ALLIANCE_LEADER);
  619. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
  620. ===================================================================
  621. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java    (revision 40)
  622. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java    (working copy)
  623. @@ -39,6 +39,7 @@
  624.         if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining())
  625.             return;
  626.        
  627. +      
  628.         _items = new FastSet<ItemRequest>();
  629.        
  630.         for (int i = 0; i < count; i++)
  631. @@ -74,6 +75,12 @@
  632.         if (player.isCursedWeaponEquipped())
  633.             return;
  634.        
  635. +       if (player.isSubmitingPin())
  636. +       {
  637. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  638. +           return;
  639. +       }
  640. +      
  641.         if (!player.isInsideRadius(storePlayer, 150, true, false))
  642.             return;
  643.        
  644. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSocialAction.java
  645. ===================================================================
  646. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSocialAction.java   (revision 40)
  647. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSocialAction.java   (working copy)
  648. @@ -45,6 +45,12 @@
  649.             return;
  650.         }
  651.        
  652. +       if (activeChar.isSubmitingPin())
  653. +       {
  654. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  655. +           return;
  656. +       }
  657. +      
  658.         // check if the actionId is allowed
  659.         if (_actionId < 2 || _actionId > 13)
  660.         {
  661. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java
  662. ===================================================================
  663. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java (revision 40)
  664. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java (working copy)
  665. @@ -67,6 +67,13 @@
  666.         if (player.getSkillLevel(_skillId) >= _skillLvl)// already knows the skill with this level
  667.             return;
  668.        
  669. +       if (player.isSubmitingPin())
  670. +       {
  671. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  672. +           return;
  673. +       }
  674. +      
  675. +      
  676.         if (player.getClassId().level() < 3 || player.getLevel() < 76)
  677.             return;
  678.        
  679. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
  680. ===================================================================
  681. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (revision 40)
  682. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java    (working copy)
  683. @@ -431,7 +431,7 @@
  684.        
  685.         if(!activeChar.getPincheck())
  686.         {
  687. -              activeChar.setIsImmobilized(true);
  688. +              
  689.                TextBuilder tb = new TextBuilder();
  690.                NpcHtmlMessage html = new NpcHtmlMessage(1);
  691.                        
  692. @@ -465,6 +465,8 @@
  693.                        
  694.                html.setHtml(tb.toString());
  695.                activeChar.sendPacket(html);
  696. +              activeChar.setIsSubmitingPin(true);
  697. +              activeChar.setIsImmobilized(true);
  698.         }
  699.        
  700.         PetitionManager.getInstance().checkPetitionMessages(activeChar);
  701. Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java
  702. ===================================================================
  703. --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 40)
  704. +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
  705. @@ -132,6 +132,7 @@
  706.     private boolean _isFlying = false; // Is flying wyvern ?
  707.     private boolean _isRiding = false; // Is riding strider ?
  708.    
  709. +   public boolean _isSubmitingPin;
  710.     private boolean _isPartyInviteProtected = false;
  711.     private boolean _isFriendInviteProtected = false;
  712.     private boolean _isBuffProtected = false;
  713. @@ -2020,7 +2021,16 @@
  714.     {
  715.         return _isPartyInviteProtected;  
  716.     }
  717. +
  718. +   public final void setIsSubmitingPin(boolean value)
  719. +   {
  720. +       _isSubmitingPin = value;
  721. +   }
  722.    
  723. +   public boolean isSubmitingPin()
  724. +   {
  725. +       return _isSubmitingPin;  
  726. +   }
  727.     public final void setPvpItemReward(boolean value)
  728.     {
  729.         _pvpItemReward = value;
  730. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestUnEquipItem.java
  731. ===================================================================
  732. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestUnEquipItem.java    (revision 40)
  733. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestUnEquipItem.java    (working copy)
  734. @@ -49,6 +49,12 @@
  735.         if (item == null)
  736.             return;
  737.        
  738. +       if (activeChar.isSubmitingPin())
  739. +       {
  740. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  741. +           return;
  742. +       }
  743. +      
  744.         // Prevent of unequiping a cursed weapon
  745.         if (_slot == L2Item.SLOT_LR_HAND && activeChar.isCursedWeaponEquipped())
  746.             return;
  747. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStartPledgeWar.java
  748. ===================================================================
  749. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStartPledgeWar.java (revision 40)
  750. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestStartPledgeWar.java (working copy)
  751. @@ -48,6 +48,12 @@
  752.             return;
  753.         }
  754.        
  755. +       if (player.isSubmitingPin())
  756. +       {
  757. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  758. +           return;
  759. +       }
  760. +      
  761.         if (!player.isClanLeader())
  762.         {
  763.             player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  764. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java
  765. ===================================================================
  766. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java  (revision 40)
  767. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestMagicSkillUse.java  (working copy)
  768. @@ -43,6 +43,12 @@
  769.         if (activeChar == null)
  770.             return;
  771.        
  772. +       if (activeChar.isSubmitingPin())
  773. +       {
  774. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  775. +           return;
  776. +       }
  777. +      
  778.         if (activeChar.isOutOfControl())
  779.         {
  780.             activeChar.sendPacket(ActionFailed.STATIC_PACKET);
  781. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
  782. ===================================================================
  783. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java   (revision 40)
  784. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java   (working copy)
  785. @@ -73,6 +73,12 @@
  786.         if (!player.isInsideRadius(storePlayer, 150, true, false))
  787.             return;
  788.        
  789. +       if (player.isSubmitingPin())
  790. +       {
  791. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  792. +           return;
  793. +       }
  794. +      
  795.         if (storePlayer.getPrivateStoreType() != L2PcInstance.STORE_PRIVATE_BUY)
  796.             return;
  797.        
  798. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java
  799. ===================================================================
  800. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java    (revision 40)
  801. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java    (working copy)
  802. @@ -49,6 +49,12 @@
  803.         if (activeChar == null)
  804.             return;
  805.        
  806. +       if (activeChar.isSubmitingPin())
  807. +       {
  808. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  809. +           return;
  810. +       }
  811. +      
  812.         int count = _count;
  813.         if (count <= 0)
  814.         {
  815. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithdrawalPledge.java
  816. ===================================================================
  817. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithdrawalPledge.java   (revision 40)
  818. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestWithdrawalPledge.java   (working copy)
  819. @@ -42,6 +42,12 @@
  820.             return;
  821.         }
  822.        
  823. +       if (activeChar.isSubmitingPin())
  824. +       {
  825. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  826. +           return;
  827. +       }
  828. +      
  829.         if (activeChar.isClanLeader())
  830.         {
  831.             activeChar.sendPacket(SystemMessageId.CLAN_LEADER_CANNOT_WITHDRAW);
  832. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java
  833. ===================================================================
  834. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java   (revision 40)
  835. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java   (working copy)
  836. @@ -76,6 +76,12 @@
  837.             return;
  838.         }
  839.        
  840. +       if (player.isSubmitingPin())
  841. +       {
  842. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  843. +           return;
  844. +       }
  845. +      
  846.         if (AttackStanceTaskManager.getInstance().getAttackStanceTask(player) || (player.isCastingNow() || player.isCastingSimultaneouslyNow()) || player.isInDuel())
  847.         {
  848.             player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT);
  849. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java
  850. ===================================================================
  851. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java   (revision 40)
  852. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendInvite.java   (working copy)
  853. @@ -61,6 +61,19 @@
  854.             return;
  855.         }
  856.        
  857. +       if (activeChar.isSubmitingPin())
  858. +       {
  859. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  860. +           return;
  861. +       }
  862. +      
  863. +       if (friend.isSubmitingPin())
  864. +       {
  865. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted by the target");
  866. +           return;
  867. +       }
  868. +      
  869. +      
  870.         if (BlockList.isBlocked(activeChar, friend))
  871.         {
  872.             activeChar.sendMessage("You have blocked " + _name + ".");
  873. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
  874. ===================================================================
  875. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java   (revision 40)
  876. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java   (working copy)
  877. @@ -90,6 +90,12 @@
  878.             return;
  879.         }
  880.        
  881. +       if (activeChar.isSubmitingPin())
  882. +       {
  883. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  884. +           return;
  885. +       }
  886. +      
  887.         L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
  888.         if (item == null)
  889.             return;
  890. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
  891. ===================================================================
  892. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java   (revision 40)
  893. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java   (working copy)
  894. @@ -109,6 +109,12 @@
  895.        
  896.         player.addAdena("Sell", totalPrice, merchant, false);
  897.        
  898. +       if (player.isSubmitingPin())
  899. +       {
  900. +           player.sendMessage("Unable to do any action while PIN is not submitted");
  901. +           return;
  902. +       }
  903. +      
  904.         // Send the htm, if existing.
  905.         String htmlFolder = "";
  906.         if (merchant instanceof L2MerchantInstance)
  907. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java
  908. ===================================================================
  909. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java  (revision 40)
  910. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSendFriendMsg.java  (working copy)
  911. @@ -59,6 +59,18 @@
  912.             return;
  913.         }
  914.        
  915. +       if (activeChar.isSubmitingPin())
  916. +       {
  917. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  918. +           return;
  919. +       }
  920. +      
  921. +       if (targetPlayer.isSubmitingPin())
  922. +       {
  923. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted by the target");
  924. +           return;
  925. +       }
  926. +      
  927.         if (Config.LOG_CHAT)
  928.         {
  929.             LogRecord record = new LogRecord(Level.INFO, _message);
  930. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
  931. ===================================================================
  932. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java    (revision 40)
  933. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java    (working copy)
  934. @@ -60,6 +60,13 @@
  935.             return;
  936.         }
  937.        
  938. +       if (activeChar.isSubmitingPin())
  939. +       {
  940. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  941. +           return;
  942. +       }
  943. +      
  944. +      
  945.         if (activeChar.isProcessingTransaction() || activeChar.isInStoreMode())
  946.         {
  947.             activeChar.sendPacket(SystemMessageId.CANNOT_ENCHANT_WHILE_STORE);
  948. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java
  949. ===================================================================
  950. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java  (revision 40)
  951. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestFriendDel.java  (working copy)
  952. @@ -43,6 +43,13 @@
  953.         if (activeChar == null)
  954.             return;
  955.        
  956. +       if (activeChar.isSubmitingPin())
  957. +       {
  958. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  959. +           return;
  960. +       }
  961. +      
  962. +      
  963.         int id = CharNameTable.getInstance().getIdByName(_name);
  964.        
  965.         if (id == -1 || !activeChar.getFriendList().contains(id))
  966. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java
  967. ===================================================================
  968. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java  (revision 40)
  969. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestJoinParty.java  (working copy)
  970. @@ -55,6 +55,7 @@
  971.                 return;
  972.             }
  973.        
  974. +      
  975.         final L2PcInstance target = L2World.getInstance().getPlayer(_name);
  976.         if (target == null)
  977.         {
  978. @@ -68,6 +69,18 @@
  979.             return;
  980.         }
  981.        
  982. +       if (target.isSubmitingPin())
  983. +       {
  984. +           requestor.sendMessage("Unable to do any action while PIN is not submitted");
  985. +           return;
  986. +       }
  987. +      
  988. +       if (requestor.isSubmitingPin())
  989. +       {
  990. +           requestor.sendMessage("Unable to do any action while PIN is not submitted");
  991. +           return;
  992. +       }
  993. +      
  994.         if(target.isPartyInviteProtected())
  995.         {
  996.             requestor.sendMessage(target.getName() + " has Party Invite Protection enabled.");
  997. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
  998. ===================================================================
  999. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java   (revision 40)
  1000. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java   (working copy)
  1001. @@ -49,6 +49,13 @@
  1002.         if (activeChar == null || activeChar.isDead())
  1003.             return;
  1004.        
  1005. +       if (activeChar.isSubmitingPin())
  1006. +       {
  1007. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  1008. +           return;
  1009. +       }
  1010. +      
  1011. +      
  1012.         if (!getClient().getFloodProtectors().getDropItem().tryPerformAction("dropItem"))
  1013.             return;
  1014.        
  1015. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java
  1016. ===================================================================
  1017. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java    (revision 40)
  1018. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCrystallizeItem.java    (working copy)
  1019. @@ -46,6 +46,12 @@
  1020.         if (activeChar == null)
  1021.             return;
  1022.        
  1023. +       if (activeChar.isSubmitingPin())
  1024. +       {
  1025. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  1026. +           return;
  1027. +       }
  1028. +      
  1029.         if (_count <= 0)
  1030.         {
  1031.             Util.handleIllegalPlayerAction(activeChar, "[RequestCrystallizeItem] " + activeChar.getName() + "tried to crystallize an object but count was inferior to 0", IllegalPlayerAction.PUNISH_KICK);
  1032. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
  1033. ===================================================================
  1034. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java  (revision 40)
  1035. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java  (working copy)
  1036. @@ -148,6 +148,12 @@
  1037.             return;
  1038.         }
  1039.        
  1040. +       if (activeChar.isSubmitingPin())
  1041. +       {
  1042. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  1043. +           return;
  1044. +       }
  1045. +      
  1046.         if (_text.isEmpty())
  1047.         {
  1048.             _log.warning(activeChar.getName() + ": sending empty text. Possible packet hack.");
  1049. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetAllyCrest.java
  1050. ===================================================================
  1051. --- aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetAllyCrest.java   (revision 40)
  1052. +++ aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSetAllyCrest.java   (working copy)
  1053. @@ -58,6 +58,12 @@
  1054.             return;
  1055.         }
  1056.        
  1057. +       if (activeChar.isSubmitingPin())
  1058. +       {
  1059. +           activeChar.sendMessage("Unable to do any action while PIN is not submitted");
  1060. +           return;
  1061. +       }
  1062. +      
  1063.         if (activeChar.getAllyId() != 0)
  1064.         {
  1065.             L2Clan leaderclan = ClanTable.getInstance().getClan(activeChar.getAllyId());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement