Jump to content

B1ggBoss

Legendary Member
  • Posts

    494
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by B1ggBoss

  1. dunno exactly, but from an overview, try broadcasting a movebackwardtolocation packet
  2. ye, press the "x" button in the upper right corner the window is automatically added by the client, there is no packet that enable/disable it
  3. http://maxcheaters.com/forum/index.php?topic=219023.0 to Market Place > L2Pack And Files
  4. wrong section, locked
  5. works for me http://imageshack.us/photo/my-images/854/shot00008ai.jpg/
  6. add a long variable at L2PcInstance. When he ends the trade, you store the cur time (System.curTimeInMilis()) + 10000 (10 seconds) On request restart / log out packets, check that System.curTimeInMilis() is higher than the time stored in L2PcInstance to let them go out. However, whats the point of this? If they want, they can crash the client and force the log out
  7. show us your configs as well as fork, chronicle, revision, etc...
  8. http://maxcheaters.com/forum/index.php?topic=218599.0 to Dev Help [EN] And junk this: http://maxcheaters.com/forum/index.php?topic=218597.0 http://maxcheaters.com/forum/index.php?topic=218598.0
  9. wrong section x3 time, dekarma as punish locked
  10. holy christ wrong section, please, read the rules locked
  11. http://maxcheaters.com/forum/index.php?topic=218506.0 http://maxcheaters.com/forum/index.php?topic=218507.0 http://maxcheaters.com/forum/index.php?topic=218536.0 to Dev Help [GR] And Junk this: http://maxcheaters.com/forum/index.php?topic=218535.0 http://maxcheaters.com/forum/index.php?topic=218476.0
  12. wrong section locked. For futher wrong section posts, avoid to post over them if you know they are not in the right place
  13. wrong section, locked
  14. in your script, at if event == 120:, this line appears like this SkillTable.getInstance().getInfo(1191,3).getEffects(st.getPlayer(),st.getPlayer()) or like this SkillTable.getInstance().getInfo (1191,3).getEffects(st.getPlayer(),st.getPlayer()) ? You must know that python works by identation EDIT: Doubt solved, topic closed. Solution above
  15. i didnt work over it for so long, but its an abstract engine, it can be coded for any chornicle. About what event contains, it only comes with tvt to test it. The goal of this share isnt to give many events, but to decrease the time and work needed to code one
  16. i just coded it, but did not test ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4838) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -5675,9 +5675,73 @@ // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); sendPacket(new ExBrExtraUserInfo(this)); + + chanceEnchantReward(); } } + private final void chanceEnchantReward() + { + final int chance = 5; // 5% of chance to get an item enchanted + + final int producedChance = Rnd.get(100) + 1; + if(producedChance <= chance) + { + FastList<L2ItemInstance> enchantableItems = new FastList<L2ItemInstance>(); + PcInventory inv = getInventory(); + for(L2ItemInstance itm : inv.getItems()) + if(itm.isArmor() || itm.isWeapon()) + enchantableItems.add(itm); + + L2ItemInstance enchantedItem = null; + boolean enchanted = false; + do + { + enchantedItem = enchantableItems.remove(Rnd.get(enchantableItems.size())); + if(enchantedItem.isWeapon()) + { + if(((L2Weapon)enchantedItem.getItem()).isCrystallizable() + && enchantedItem.getEnchantLevel() < Config.ENCHANT_MAX_WEAPON) + { + synchronized(inv) + { + enchantedItem.setEnchantLevel(enchantedItem.getEnchantLevel() + 1); + enchanted = true; + } + } + } + else if(enchantedItem.isArmor()) + { + L2Armor armorItem = (L2Armor)enchantedItem.getItem(); + if(armorItem.isCrystallizable()) + { + if((armorItem.getType1() == L2Item.TYPE1_WEAPON_RING_EARRING_NECKLACE + && enchantedItem.getEnchantLevel() < Config.ENCHANT_MAX_JEWELRY) + || (armorItem.getType1() == L2Item.TYPE1_SHIELD_ARMOR + && enchantedItem.getEnchantLevel() < Config.ENCHANT_MAX_ARMOR)) + { + synchronized(inv) + { + enchantedItem.setEnchantLevel(enchantedItem.getEnchantLevel() + 1); + enchanted = true; + } + } + } + } + + if(enchanted) + { + broadcastUserInfo(); + sendPacket(new ItemList(this, false)); + SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED); + sm.addItemName(enchantedItem); + sendPacket(sm); + } + } + while(!enchanted); + } + } + /** * Increase pk count, karma and send the info to the player *
  17. wrong section, locked
  18. could you tell us whats the problem? At first view, this st.setState(COMPLETED) should be like this st.setState(State.COMPLETED)
  19. http://maxcheaters.com/forum/index.php?topic=218432.0 http://maxcheaters.com/forum/index.php?topic=218444.0 http://maxcheaters.com/forum/index.php?topic=218471.0 to Dev Help [GR]
  20. you could do it by using ExShowScreenMessage, but i dont see fine from the server performance's point of view. The handy block checker event has a clock, but you will need to modify it a bit to fit the tvt data. At this momment i dont remember if there was any other packet that could trigger a clock in the client
  21. did not add support for adding it by admin command, just by maunally edit database
  22. The patch is made for last l2jserver trunk version
×
×
  • Create New...

Important Information

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