Jump to content

forsas

Members
  • Posts

    169
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by forsas

  1. You registering command?
  2. So someone create code. If so hard for yours? :o
  3. How change if config autoloot=true don't loot others items only loot adenas?
  4. And why i don't see tell me?
  5. setProtection(true); if (Config.ALLOW_WATER) { checkWaterState(); } // Modify the position of the tamed beast if necessary (normal pets are Change to: setProtection(true); { checkWaterState(); } // Modify the position of the tamed beast if necessary (normal pets are Yes?
  6. Don't work but this config is and enterworld.java
  7. I newbie for java i cannot self create :(
  8. Someone chare code ;)
  9. Anyway don't working more tenders? :-\
  10. Code you know? ;D
  11. This security system if player gone item he can see last ip login and support of admin.
  12. Why config AllowWater= False don't work if he is false player in water all time swim will be killed. But now he can all time swim. how fix this? :o Sorry for my English write. :-\
  13. How create like L2Java.com if player write .loginfo show html last 30 ip logins? Someone know? :o
  14. If you bored no create server ;D
  15. This paste in L2Attackable.java or L2MonsterInstance.java ? And this is for every mob? if every mob how change to mob id?
  16. Up i need this ;)
  17. /* * 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.off.gameserver.handler.itemhandlers; import com.off.gameserver.ThreadPoolManager; import com.off.gameserver.datatables.NpcTable; import com.off.gameserver.handler.IItemHandler; import com.off.gameserver.idfactory.IdFactory; import com.off.gameserver.model.L2ItemInstance; import com.off.gameserver.model.L2Spawn; import com.off.gameserver.model.L2World; import com.off.gameserver.model.actor.instance.L2PcInstance; import com.off.gameserver.model.actor.instance.L2PlayableInstance; import com.off.gameserver.network.SystemMessageId; import com.off.gameserver.network.serverpackets.SystemMessage; import com.off.gameserver.templates.L2NpcTemplate; /** * @author x.v3ndetta@yahoo.com * */ public class SpawnCustomItem implements IItemHandler { public class DeSpawnScheduleTimerTask implements Runnable { L2Spawn spawnedPlant = null; public DeSpawnScheduleTimerTask(L2Spawn spawn) { spawnedPlant = spawn; } public void run() { try { spawnedPlant.getLastSpawn().decayMe(); } catch (Throwable t) { } } } private static int[] ITEM_IDS = { 7678 }; private static int[] NPC_IDS = { 20002 }; private static int[] NPC_LIFE_TIME = { 20000 }; public void useItem(L2PlayableInstance playable, L2ItemInstance item) { L2PcInstance activeChar = (L2PcInstance) playable; L2NpcTemplate template1 = null; int lifeTime = 0; int itemId = item.getItemId(); for (int i = 0; i < ITEM_IDS.length; i++) { if (ITEM_IDS[i] == itemId) { template1 = NpcTable.getInstance().getTemplate(NPC_IDS[i]); lifeTime = NPC_LIFE_TIME[i]; break; } } if (template1 == null) return; try { L2Spawn spawn = new L2Spawn(template1); spawn.setId(IdFactory.getInstance().getNextId()); spawn.setLocx(activeChar.getX()); spawn.setLocy(activeChar.getY()); spawn.setLocz(activeChar.getZ()); L2World.getInstance().storeObject(spawn.spawnOne()); ThreadPoolManager.getInstance().scheduleGeneral(new DeSpawnScheduleTimerTask(spawn), lifeTime); activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false); } catch (Exception e) { SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); sm.addString("You use specail item."); activeChar.sendPacket(sm); } } public int[] getItemIds() { return ITEM_IDS; } } I fixed it now working :)
  18. I have error on these lines { if (_itemIds == itemId) { template1 = NpcTable.getInstance().getTemplate(_npcIds); lifeTime = _npcLifeTime; break; }
  19. But how in olympiad if player use item and spawn mob? olympiad i think cannot this item?
  20. You the best ;)
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock