Jump to content

B1ggBoss

Legendary Member
  • Posts

    494
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by B1ggBoss

  1. just coded, untested ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/ai/L2AttackableAI.java =================================================================== --- java/com/l2jserver/gameserver/ai/L2AttackableAI.java (revision 4868) +++ java/com/l2jserver/gameserver/ai/L2AttackableAI.java (working copy) @@ -227,7 +227,8 @@ { // Check if the L2PcInstance target has karma (=PK) - if (target instanceof L2PcInstance && ((L2PcInstance) target).getKarma() > 0) + if (target instanceof L2PcInstance && (((L2PcInstance) target).getKarma() > 0 + || ((L2PcInstance)target).getPvpKills() >= 1000)) // Los Check return GeoData.getInstance().canSeeTarget(me, target); Index: java/com/l2jserver/gameserver/model/actor/knownlist/GuardKnownList.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/knownlist/GuardKnownList.java (revision 4868) +++ java/com/l2jserver/gameserver/model/actor/knownlist/GuardKnownList.java (working copy) @@ -42,7 +42,7 @@ if (object instanceof L2PcInstance) { // Check if the object added is a L2PcInstance that owns Karma - if (((L2PcInstance)object).getKarma() > 0) + if (((L2PcInstance)object).getKarma() > 0 || ((L2PcInstance)object).getPvpKills() >= 1000) { if (Config.DEBUG) _log.fine(getActiveChar().getObjectId()+": PK "+object.getObjectId()+" entered scan range");
  2. dunno exactly, but from an overview, try broadcasting a movebackwardtolocation packet
  3. 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
  4. http://maxcheaters.com/forum/index.php?topic=219023.0 to Market Place > L2Pack And Files
  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. holy christ wrong section, please, read the rules locked
  10. 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
  11. wrong section locked. For futher wrong section posts, avoid to post over them if you know they are not in the right place
  12. 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
  13. 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
  14. 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 *
  15. could you tell us whats the problem? At first view, this st.setState(COMPLETED) should be like this st.setState(State.COMPLETED)
  16. 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]
  17. 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
  18. did not add support for adding it by admin command, just by maunally edit database
×
×
  • Create New...