Jump to content

Chakl22

Members
  • Posts

    107
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Chakl22

  1. I used L2ini modified with my IP server for connect and works perfect, the problems is when i connect the Router, maybe i need put some extra IP here but dunno waht IP. PLease help. This is how i have configured: <?xml version="1.0" encoding="UTF-8"?> <!-- Externalhost here (Internet IP) or Localhost IP for local test --> <gameserver address="xxxxx.no-ip.biz " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ipconfig.xsd"> <!-- Localhost here --> <define subnet="127.0.0.0/8" address="127.0.0.1" /> <!-- Internalhosts here (LANs IPs) --> <define subnet="10.0.0.0/8" address="10.0.0.0" /> <define subnet="172.16.0.0/19" address="172.16.0.0" /> <define subnet="192.168.0.0/16" address="192.168.0.0" /> </gameserver>
  2. The only thing is i need make the MOBS agro, the only way for the Guard attack them if they are passive will not attack i think. # --------------------------------------------------------------------------- # Guards # --------------------------------------------------------------------------- # True - Allows guards to attack aggressive mobs within range. # Default: False GuardAttackAggroMob = False
  3. I wanna make this: Player pawn a mob with duble clicking in a X Item (i have solved this part). Now i will like to know if for example in "NPCAIDATA" i see there is a celd for "Clan" and "Enemy Clan" so based on this i can make a MOB Enemie of the other Clan fight against each other in this way? PD: The idea is when a player get an item can spawn a MOB and this MOB help him in a fight versus a hard MOB, now the question is the Helping MOB will really help the player i mean who will attack first the helper mob the player or the enemie Clan Mob? Thx in advance for who can help me.
  4. Where change the item ID and amount?
  5. can be changed for not give MP in combat state? (Purple).
  6. Well this is strange the Fake PC's attack with Magic/Ranged skills without problems, but when i put a skill for example soul breaker, triple sonic slash, etc... don't attack with skill and i m doing all correct i make the class, put the mastery for the weapon, in NPCAI i put like 30% CHANCE FOR USE SKILL BUT NOTHING HAPPEND.
  7. WoW this forum really help ppl!
  8. This code ws for other Chronicle so i change the Imports and NPC: #Spawn a NPC Script import sys from com.l2jserver.gameserver import Announcements from com.l2jserver.gameserver import GameTimeController from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "Spawn_A_NPC" #Write the ID of the NPC you want to spawn here NpcSpawn = 40007 #Time before the spawn disappears(duration) in minutes SpawnDuration = 5 #The spawn times are set to be on the hour exactly #In this example, the spawn will happen at 5:00,11:00,17:00,23:00 SpawnTimes = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23] #If you want to set a % chance for the NPC to spawn or not #Set to 100% as default SpawnChance = 100 class Spawn_A_NPC(JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.startQuestTimer("timer_check",60000, None, None, True) self.spawnCoords ={ 0: {'name':"in tent village." , 'X':8985 , 'Y':252976 , 'Z':-1933}, 1: {'name':"in ghost town." , 'X':-25436 , 'Y':251767 , 'Z':-3257}, 2: {'name':"near hidden oasis." , 'X':-19767 , 'Y':249873 , 'Z':-3258}, 3: {'name':"in caravan encampment." , 'X':-4292 , 'Y':256574 , 'Z':-3135}, 4: {'name':"near ancient temple remnants." , 'X':-28017 , 'Y':257666 , 'Z':-1908}, 5: {'name':"near Hellboound quarry." , 'X':-7666 , 'Y':246367 , 'Z':-1858}, 6: {'name':"near enchanted megaliths." , 'X':-21151 , 'Y':241954 , 'Z':-3124}, 7: {'name':"near Hellbound entrance." , 'X':-11026 , 'Y':238154 , 'Z':-3068}, } def onAdvEvent (self,event,npc,pc) : if event == "timer_check" : gameTime = GameTimeController.getInstance().getGameTime() h = (gameTime/60)%24 m = gameTime%60 if h in SpawnTimes and m == 00 : rn = Rnd.get(100) if rn <= SpawnChance: self.startQuestTimer("Start",100, None, None) if event == "Start" : spawn = int(Rnd.get(8)) location = self.spawnCoords[spawn]['name'] xx,yy,zz = self.spawnCoords[spawn]['X'],self.spawnCoords[spawn]['Y'],self.spawnCoords[spawn]['Z'] despawn = SpawnDuration * 60000 npcSpawn = self.addSpawn(NpcSpawn,xx,yy,zz,0,False,despawn) Announcements.getInstance().announceToAll(npcSpawn.getName() + " has spawned " + location) return QUEST = Spawn_A_NPC(-1, qn, "Spawn_A_NPC") print "Spawn_A_NPC script loaded." I put this __init_.py in C:\server\gameserver\data\scripts\quests\Spawn_A_NPC and add to: # Quests Section quests/Spawn_A_NPC/__init__.py No errors in console but NPC is not spawned. what can be?
  9. I have problem refreshing the forum not was intentional. You have something to contribute with my problem?
  10. Ok i m using this code for a Instance Event, this work Fine but the part where the players need to know how much time need wait for join again not work Index: data/scripts/handlers/usercommandhandlers/InstanceZone.java =================================================================== --- data/scripts/handlers/usercommandhandlers/InstanceZone.java (revision 7669) +++ data/scripts/handlers/usercommandhandlers/InstanceZone.java (working copy) @@ -72,13 +72,22 @@ firstMessage = false; activeChar.sendPacket(new SystemMessage(SystemMessageId.INSTANCE_ZONE_TIME_LIMIT)); } - int hours = (int) (remainingTime / 3600); - int minutes = (int) ((remainingTime%3600) / 60); - SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); - sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); - sm.addNumber(hours); - sm.addNumber(minutes); - activeChar.sendPacket(sm); + if (instanceId != 500000) + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); + sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); + sm.addNumber(hours); + sm.addNumber(minutes); + activeChar.sendPacket(sm); + } + else + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes."); + } } else InstanceManager.getInstance().deleteInstanceTime(activeChar.getObjectId(), instanceId); Index: data/scripts.cfg =================================================================== --- data/scripts.cfg (revision 7669) +++ data/scripts.cfg (working copy) @@ -207,6 +207,7 @@ village_master/orc_occupation_change_2/__init__.py # Instance Dungeons Section +instances/Bloodshed/__init__.py instances/DarkCloudMansion/DarkCloudMansion.java instances/CrystalCaverns/CrystalCaverns.java instances/Kamaloka/Kamaloka.java And here is the __init__.py #Instance Engine by Bloodshed, Fixed by Sakretsu from java.lang import System from java.sql import Connection from java.sql import PreparedStatement from java.sql import ResultSet from java.util.logging import Level from java.util.logging import Logger from com.l2jserver import L2DatabaseFactory from com.l2jserver.gameserver.instancemanager import InstanceManager from com.l2jserver.gameserver.instancemanager.InstanceManager import InstanceWorld from com.l2jserver.gameserver.model import L2ItemInstance from com.l2jserver.gameserver.model import L2Object from com.l2jserver.gameserver.model import L2World from com.l2jserver.gameserver.model.actor import L2Character from com.l2jserver.gameserver.model.actor import L2Summon from com.l2jserver.gameserver.model.entity import Instance from com.l2jserver.gameserver.model.itemcontainer import PcInventory from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jserver.gameserver.network.serverpackets import CreatureSay from com.l2jserver.gameserver.network.serverpackets import InventoryUpdate from com.l2jserver.gameserver.network.serverpackets import MagicSkillUse from com.l2jserver.gameserver.network.serverpackets import SystemMessage from com.l2jserver.gameserver.network.serverpackets import ExShowScreenMessage from com.l2jserver.gameserver.network.serverpackets import Earthquake from com.l2jserver.gameserver.network import SystemMessageId from com.l2jserver.gameserver.util import Util from com.l2jserver.util import Rnd qn = "Bloodshed" #Items E_APIGA = 14720 ADENA = 57 STONE = 9576 SCROLL = 960 #NPCs ROSE = 40000 CHEST = 40001 #Monsters NAGLFAR = 40002 SENTRY1 = 40003 SENTRY2 = 40004 HOUND = 40005 #Timelimit TIMELIMIT = 86400000 #Instance Id INSTANCEID = 500000 #Doors DOOR1 = 12240001 DOOR2 = 12240002 class PyObject: pass def openDoor(doorId,instanceId): for door in InstanceManager.getInstance().getInstance(instanceId).getDoors(): if door.getDoorId() == doorId: door.openMe() def closeDoor(doorId,instanceId): for door in InstanceManager.getInstance().getInstance(instanceId).getDoors(): if door.getDoorId() == doorId: door.closeMe() def checkConditions(player, new): st = player.getQuestState(qn) reentertime = InstanceManager.getInstance().getInstanceTime(player.getObjectId(), INSTANCEID); party = player.getParty() if party: player.sendPacket(SystemMessage.sendString("You may not enter with a party.")) return False if not player.getLevel() >= 83: player.sendPacket(SystemMessage.sendString("You must be level 83 or higher to enter.")) return False if System.currentTimeMillis() < reentertime : InstanceManager.getInstance().getInstanceTime(player.getObjectId(), INSTANCEID) player.sendPacket(SystemMessage.sendString("Solo Instance: You may not re-enter yet.")) return False if not party: return True return False def teleportplayer(self,player,teleto): player.setInstanceId(teleto.instanceId) player.teleToLocation(teleto.x, teleto.y, teleto.z) pet = player.getPet() if pet != None : pet.setInstanceId(teleto.instanceId) pet.teleToLocation(teleto.x, teleto.y, teleto.z) return def enterInstance(self,player,template,teleto): instanceId = 0 party = player.getParty() if party : for partyMember in party.getPartyMembers().toArray(): st = partyMember.getQuestState(qn) if not st : st = self.newQuestState(partyMember) if partyMember.getInstanceId()!=0: instanceId = partyMember.getInstanceId() else : if player.getInstanceId()!=0: instanceId = player.getInstanceId() if instanceId != 0: if not checkConditions(player,False): return 0 foundworld = False for worldid in self.world_ids: if worldid == instanceId: foundworld = True if not foundworld: player.sendPacket(SystemMessage.sendString("You have entered another zone, therefore you cannot enter this one.")) return 0 teleto.instanceId = instanceId teleportplayer(self,player,teleto) return instanceId else: if not checkConditions(player,True): return 0 instanceId = InstanceManager.getInstance().createDynamicInstance(template) if not instanceId in self.world_ids: world = PyObject() world.rewarded=[] world.instanceId = instanceId world.templateId = INSTANCEID self.worlds[instanceId]=world self.world_ids.append(instanceId) print "Instance Bloodshed.xml Started: " +str(instanceId) + " created by " + str(player.getName()) st = player.getQuestState(qn) InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, ((System.currentTimeMillis() + TIMELIMIT))) teleto.instanceId = instanceId teleportplayer(self,player,teleto) return instanceId return instanceId def exitInstance(player,tele): player.setInstanceId(0) player.teleToLocation(tele.x, tele.y, tele.z) pet = player.getPet() if pet != None : pet.setInstanceId(0) pet.teleToLocation(tele.x, tele.y, tele.z) class Bloodshed(JQuest): def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.worlds = {} self.world_ids = [] def onTalk (self,npc,player): st = player.getQuestState(qn) npcId = npc.getNpcId() if npcId == ROSE : tele = PyObject() tele.x = -238599 tele.y = 219983 tele.z = -10144 enterInstance(self, player, "Bloodshed.xml", tele) st.playSound("ItemSound.quest_middle") elif npcId == CHEST : npc.decayMe() tele = PyObject() tele.x = 83279 tele.y = 148011 tele.z = -3404 exitInstance(player,tele) st.giveItems(ADENA,2750000) st.giveItems(STONE,1) st.giveItems(SCROLL,1) st.playSound("ItemSound.quest_finish") player.sendPacket(ExShowScreenMessage("Solo Instance Event (83+): Completed", 8000)) return def onKill(self,npc,player,isPet): st = player.getQuestState(qn) npcId = npc.getNpcId() if npcId == SENTRY1 : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me!")) st.giveItems(E_APIGA,1) openDoor(DOOR1,npc.instanceId) elif npcId == SENTRY2 : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me!")) st.giveItems(E_APIGA,1) openDoor(DOOR2,npc.instanceId) elif npcId == HOUND : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") st.giveItems(E_APIGA,2) player.sendPacket(ExShowScreenMessage("Demonic Lord Naglfar Has Appeared!", 8000)) newNpc = self.addSpawn(NAGLFAR,-242754,219982,-9985,306,False,0,False,npc.instanceId) player.sendPacket(Earthquake(240826,219982,-9985,20,10)) elif npcId == NAGLFAR : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Ugh.... Defeated.. How!?")) player.sendPacket(ExShowScreenMessage("Congratulations! You Have Defeated Demonic Lord Naglfar.", 12000)) st.playSound("ItemSound.quest_fanfare_2") st.giveItems(E_APIGA,4) newNpc = self.addSpawn(CHEST,-242754,219982,-9985,306,False,0,False,npc.instanceId) return QUEST = Bloodshed(-1, qn, "Bloodshed") QUEST.addStartNpc(ROSE) QUEST.addTalkId(ROSE) QUEST.addTalkId(CHEST) QUEST.addKillId(NAGLFAR) QUEST.addKillId(HOUND) QUEST.addKillId(SENTRY1) QUEST.addKillId(SENTRY2) I think the problem is in somewhere here: + if (instanceId != 500000) + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); + sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); + sm.addNumber(hours); + sm.addNumber(minutes); + activeChar.sendPacket(sm); + } + else + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes."); + } The only message i get is: player.sendPacket(SystemMessage.sendString("Solo Instance: You may not re-enter yet.")) But i would like player see the time remaining hoursmin/secs. thx in advance. PD: An other strange thing is the Mobs in the Instace don't move i mean i hit them but they attack me but don't follow me :shock:
  11. Ok i m using this code for a Instance Event, this work Fine but the part where the players need to know how much time need wait for join again not work Index: data/scripts/handlers/usercommandhandlers/InstanceZone.java =================================================================== --- data/scripts/handlers/usercommandhandlers/InstanceZone.java (revision 7669) +++ data/scripts/handlers/usercommandhandlers/InstanceZone.java (working copy) @@ -72,13 +72,22 @@ firstMessage = false; activeChar.sendPacket(new SystemMessage(SystemMessageId.INSTANCE_ZONE_TIME_LIMIT)); } - int hours = (int) (remainingTime / 3600); - int minutes = (int) ((remainingTime%3600) / 60); - SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); - sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); - sm.addNumber(hours); - sm.addNumber(minutes); - activeChar.sendPacket(sm); + if (instanceId != 500000) + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); + sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); + sm.addNumber(hours); + sm.addNumber(minutes); + activeChar.sendPacket(sm); + } + else + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes."); + } } else InstanceManager.getInstance().deleteInstanceTime(activeChar.getObjectId(), instanceId); Index: data/scripts.cfg =================================================================== --- data/scripts.cfg (revision 7669) +++ data/scripts.cfg (working copy) @@ -207,6 +207,7 @@ village_master/orc_occupation_change_2/__init__.py # Instance Dungeons Section +instances/Bloodshed/__init__.py instances/DarkCloudMansion/DarkCloudMansion.java instances/CrystalCaverns/CrystalCaverns.java instances/Kamaloka/Kamaloka.java And here is the __init__.py #Instance Engine by Bloodshed, Fixed by Sakretsu from java.lang import System from java.sql import Connection from java.sql import PreparedStatement from java.sql import ResultSet from java.util.logging import Level from java.util.logging import Logger from com.l2jserver import L2DatabaseFactory from com.l2jserver.gameserver.instancemanager import InstanceManager from com.l2jserver.gameserver.instancemanager.InstanceManager import InstanceWorld from com.l2jserver.gameserver.model import L2ItemInstance from com.l2jserver.gameserver.model import L2Object from com.l2jserver.gameserver.model import L2World from com.l2jserver.gameserver.model.actor import L2Character from com.l2jserver.gameserver.model.actor import L2Summon from com.l2jserver.gameserver.model.entity import Instance from com.l2jserver.gameserver.model.itemcontainer import PcInventory from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jserver.gameserver.network.serverpackets import CreatureSay from com.l2jserver.gameserver.network.serverpackets import InventoryUpdate from com.l2jserver.gameserver.network.serverpackets import MagicSkillUse from com.l2jserver.gameserver.network.serverpackets import SystemMessage from com.l2jserver.gameserver.network.serverpackets import ExShowScreenMessage from com.l2jserver.gameserver.network.serverpackets import Earthquake from com.l2jserver.gameserver.network import SystemMessageId from com.l2jserver.gameserver.util import Util from com.l2jserver.util import Rnd qn = "Bloodshed" #Items E_APIGA = 14720 ADENA = 57 STONE = 9576 SCROLL = 960 #NPCs ROSE = 40000 CHEST = 40001 #Monsters NAGLFAR = 40002 SENTRY1 = 40003 SENTRY2 = 40004 HOUND = 40005 #Timelimit TIMELIMIT = 86400000 #Instance Id INSTANCEID = 500000 #Doors DOOR1 = 12240001 DOOR2 = 12240002 class PyObject: pass def openDoor(doorId,instanceId): for door in InstanceManager.getInstance().getInstance(instanceId).getDoors(): if door.getDoorId() == doorId: door.openMe() def closeDoor(doorId,instanceId): for door in InstanceManager.getInstance().getInstance(instanceId).getDoors(): if door.getDoorId() == doorId: door.closeMe() def checkConditions(player, new): st = player.getQuestState(qn) reentertime = InstanceManager.getInstance().getInstanceTime(player.getObjectId(), INSTANCEID); party = player.getParty() if party: player.sendPacket(SystemMessage.sendString("You may not enter with a party.")) return False if not player.getLevel() >= 83: player.sendPacket(SystemMessage.sendString("You must be level 83 or higher to enter.")) return False if System.currentTimeMillis() < reentertime : InstanceManager.getInstance().getInstanceTime(player.getObjectId(), INSTANCEID) player.sendPacket(SystemMessage.sendString("Solo Instance: You may not re-enter yet.")) return False if not party: return True return False def teleportplayer(self,player,teleto): player.setInstanceId(teleto.instanceId) player.teleToLocation(teleto.x, teleto.y, teleto.z) pet = player.getPet() if pet != None : pet.setInstanceId(teleto.instanceId) pet.teleToLocation(teleto.x, teleto.y, teleto.z) return def enterInstance(self,player,template,teleto): instanceId = 0 party = player.getParty() if party : for partyMember in party.getPartyMembers().toArray(): st = partyMember.getQuestState(qn) if not st : st = self.newQuestState(partyMember) if partyMember.getInstanceId()!=0: instanceId = partyMember.getInstanceId() else : if player.getInstanceId()!=0: instanceId = player.getInstanceId() if instanceId != 0: if not checkConditions(player,False): return 0 foundworld = False for worldid in self.world_ids: if worldid == instanceId: foundworld = True if not foundworld: player.sendPacket(SystemMessage.sendString("You have entered another zone, therefore you cannot enter this one.")) return 0 teleto.instanceId = instanceId teleportplayer(self,player,teleto) return instanceId else: if not checkConditions(player,True): return 0 instanceId = InstanceManager.getInstance().createDynamicInstance(template) if not instanceId in self.world_ids: world = PyObject() world.rewarded=[] world.instanceId = instanceId world.templateId = INSTANCEID self.worlds[instanceId]=world self.world_ids.append(instanceId) print "Instance Bloodshed.xml Started: " +str(instanceId) + " created by " + str(player.getName()) st = player.getQuestState(qn) InstanceManager.getInstance().setInstanceTime(player.getObjectId(), INSTANCEID, ((System.currentTimeMillis() + TIMELIMIT))) teleto.instanceId = instanceId teleportplayer(self,player,teleto) return instanceId return instanceId def exitInstance(player,tele): player.setInstanceId(0) player.teleToLocation(tele.x, tele.y, tele.z) pet = player.getPet() if pet != None : pet.setInstanceId(0) pet.teleToLocation(tele.x, tele.y, tele.z) class Bloodshed(JQuest): def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.worlds = {} self.world_ids = [] def onTalk (self,npc,player): st = player.getQuestState(qn) npcId = npc.getNpcId() if npcId == ROSE : tele = PyObject() tele.x = -238599 tele.y = 219983 tele.z = -10144 enterInstance(self, player, "Bloodshed.xml", tele) st.playSound("ItemSound.quest_middle") elif npcId == CHEST : npc.decayMe() tele = PyObject() tele.x = 83279 tele.y = 148011 tele.z = -3404 exitInstance(player,tele) st.giveItems(ADENA,2750000) st.giveItems(STONE,1) st.giveItems(SCROLL,1) st.playSound("ItemSound.quest_finish") player.sendPacket(ExShowScreenMessage("Solo Instance Event (83+): Completed", 8000)) return def onKill(self,npc,player,isPet): st = player.getQuestState(qn) npcId = npc.getNpcId() if npcId == SENTRY1 : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me!")) st.giveItems(E_APIGA,1) openDoor(DOOR1,npc.instanceId) elif npcId == SENTRY2 : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me!")) st.giveItems(E_APIGA,1) openDoor(DOOR2,npc.instanceId) elif npcId == HOUND : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] st.playSound("ItemSound.quest_middle") st.giveItems(E_APIGA,2) player.sendPacket(ExShowScreenMessage("Demonic Lord Naglfar Has Appeared!", 8000)) newNpc = self.addSpawn(NAGLFAR,-242754,219982,-9985,306,False,0,False,npc.instanceId) player.sendPacket(Earthquake(240826,219982,-9985,20,10)) elif npcId == NAGLFAR : if npc.getInstanceId() in self.worlds: world = self.worlds[npc.getInstanceId()] player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Ugh.... Defeated.. How!?")) player.sendPacket(ExShowScreenMessage("Congratulations! You Have Defeated Demonic Lord Naglfar.", 12000)) st.playSound("ItemSound.quest_fanfare_2") st.giveItems(E_APIGA,4) newNpc = self.addSpawn(CHEST,-242754,219982,-9985,306,False,0,False,npc.instanceId) return QUEST = Bloodshed(-1, qn, "Bloodshed") QUEST.addStartNpc(ROSE) QUEST.addTalkId(ROSE) QUEST.addTalkId(CHEST) QUEST.addKillId(NAGLFAR) QUEST.addKillId(HOUND) QUEST.addKillId(SENTRY1) QUEST.addKillId(SENTRY2) I think the problem is in somewhere here: + if (instanceId != 500000) + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES); + sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId)); + sm.addNumber(hours); + sm.addNumber(minutes); + activeChar.sendPacket(sm); + } + else + { + int hours = (int) (remainingTime / 3600); + int minutes = (int) ((remainingTime%3600) / 60); + activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes."); + } The only message i get is: player.sendPacket(SystemMessage.sendString("Solo Instance: You may not re-enter yet.")) But i would like player see the time remaining hoursmin/secs. thx in advance. PD: An other strange thing is the Mobs in the Instace don't move i mean i hit them but they attack me but don't follow me :shock:
  12. I make a Fake Gladi and i put some skills but he never land anyone <.< EDIT: Ok skills now landed but don't make DMG for example i make a Fake Duelist and add the skill Sonic Blaster but this don't make any DMG is strange...
  13. This don't work for the last Rev Freya. please someone can update this code for make to work in Freya?
  14. Chronicle Epilogue. Rates xp/sp=1000 Adena= Custom. Ecnhants safe +3 (Full Body +4), max +12. Rates (Normals Scrolls 66%, Blessed 75%). Also a "Custom Progresive Enchant System" is implemented. NPC Buffer Basics buffs, dance/songs. Custom Scheme sytem, heal & remove buffs option. 1 Hour. GM SHOP A Grade FREE, S & S80 (Top Grade) cost specials items. An "Special PVP Shop Instance" for S80 Items. Infinity Shop with Heroe Weapons (No Heroe Status needed). GK 3 Hot PVP/Farming zones with diferent spawns & Custom Mobs. Special Bosses GK. Events TvT Every 1 Hour. Extras > 1 Only Main Town (Giran). > Skills lvl 81,82,83. Working and AUTO LEARN. > Instant lvl 77! > PVP Rewards System. > Announce PVP/PK. > GK & MP Potions can't be used in combat mode (Purple State). > Subclasses Start at lvl 77, Max lvl for Subclass 85!. > Customs "Rank Titles", Based on PVP Points. > Clases without "Heavy Mastery", can't use heavy armors like: Tyrants, Dagers, Archers etc.. (Balance System). > Spawn Protection: 25 Secs, Anti PK Guards. > Antifeed and Dual Box farm Working. > Unstuck 25 Secs > NO Attribute system , this -beep- the balance. ===> L2WarMachine <===
  15. Crhonicle: Epilogue. Rates: xp/sp=1000 Adena= Custom. Ecnhants: safe +3 (Full Body +4), max +12. Rates (Normals Scrolls 66%, Blessed 75%). Also a "Custom Progresive Enchant System" is implemented. Shop: A Grade FREE, S & S80 (Top Grade) cost specials items. An "Special PVP Shop Instance" for S80 Items. Infinity Weapons on shop, (not Heroe status needed). GK: 3 Hot PVP/Farming zones with diferent spawns & Custom Mobs. Special Bosses GK. Extras: > 1 Only Main Town (Giran). > PVP Reward. > Skills lvl 81,82,83. Working and AUTO LEARN. > Instant lvl 76! > Announce PVP/PK. > GK & MP Potions can't be used in combat mode (Purple State). > Subclasses Start at lvl 77, Max lvl for Subclass 85!. > Customs "Rank Titles", Based on PVP Points. > Clases without "Heavy Mastery", can't use heavy armors like: Tyrants, Dagers, Archers etc.. (Balance System). > Spawn Protection: 25 Secs, Anti PK Guards. > Antifeed and Dual Box farm Working. > Unstuck 25 Secs ===> L2WarMachine <===
  16. I m sure some Dev here know how make this, here we have a lot of amazing Dev's.
  17. This is very good so players not need go searching for some PVP for all map, but i see this only in one server. L2Lexx offline a long time ago. Some Dev, with nice skills can help with this? 8)
  18. I try that and not work but is strange why for ex if you look inside: servers/data/extractable_items.csv #itemId;Production1,Quantity1,Chance1[;Production2,Quantity2,Chance2... ;ProductionN,QuantityN,ChanceN] #itemId;[Production1,Quantity1,Production2,Quantity2,....],Chance1 - for 2 or more rewards (use witout [ ] ) # Shiny Halloween Toy Box - Event 20717;20718,1,20;20719,1,20;20720,1,20;20721,1,20;20722,1,20 (from this way you get a random reward) but i try to make in the same way with my item and not work dunno why. <.< Ok, is method work: # Shiny Halloween Toy Box - Event 20717;20718,1,20;20719,1,20;20720,1,20;20721,1,20;20722,1,20 This work for a random reward but the problem is when the reward item number is more than 1, i mean: 20717;20718,4,20;20719,5,20;20720,10,20;20721,20,20;20722,40,20 So how i can make it work with more that a reward?
  19. l2jdp: revision="7664" l2jserver: revision="4415" My question is how disallowed MP Potions in combat (Purple State), in previews Revs. there we have a Potions.java but in this last this is not anymore so i wonder where i need to put this code: Search bla bla: if (activeChar.isAllSkillsDisabled()) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } And past this: if (activeChar.getPvpFlag() != 0) { if (item.getItemId() == your itemID) { activeChar.sendMessage("You cannot use this in pvp mode!"); return; } } I try this in useitem.java but give error: If someone can help me will be great. thx. ::) EDITED: Solved, Big thx to CopyLeft for create a new way to make this work on last EP Rev.!
  20. Chronicle Epilogue. Rates xp/sp=1000 Adena= Custom. Ecnhants safe +3 (Full Body +4), max +12. Rates (Normals Scrolls 66%, Blessed 75%). Also a "Custom Progresive Enchant Ssystem" is implemented. NPC Buffer Basics buffs, dance/songs. Custom Scheme sytem, heal & remove buffs option. 1 Hour. GM SHOP A Grade FREE, S & S80 (Top Grade) cost specials items. An "Special PVP Shop Instance" for S80 Items. GK 3 Hot PVP/Farming zones with diferent spawns & Custom Mobs. Special Bosses GK. Events TvT Every 1 Hour. Extras > 1 Only Main Town (Giran). > Skills lvl 81,82,83. Working and AUTO LEARN. > Instant lvl 76! > Announce PVP/PK. > GK & MP Potions can't be used in combat mode (Purple State). > Subclasses Start at lvl 76, Max lvl for Subclass 85!. > Customs "Rank Titles", Based on PVP Points. > Clases without "Heavy Mastery", can't use heavy armors like: Tyrants, Dagers, Archers etc.. (Balance System). > Spawn Protection: 25 Secs, Anti PK Guards. > Antifeed and Dual Box farm Working. > Unstuck 25 Secs http://l2warmachine.ucoz.com/ http://l2warmachine.freeforums.org/index.php Fixed.
  21. #P L2_GameServer_It Index: java/net/sf/l2j/gameserver/skills/Formulas.java =================================================================== --- java/net/sf/l2j/gameserver/skills/Formulas.java (revision 3695) +++ java/net/sf/l2j/gameserver/skills/Formulas.java (working copy) @@ -1162,6 +1162,104 @@ { defence += target.getShldDef(); } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.DAGGER && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.DAGGER_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.DAGGER_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.DAGGER_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.BOW && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.ARCHER_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.ARCHER_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.ARCHER_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.BLUNT && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.BLUNT_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.BLUNT_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.BLUNT_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.DUALFIST && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.FIST_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.FIST_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.FIST_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.DUAL && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.DUAL_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.DUAL_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.DUAL_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.SWORD && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.SWORD_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.SWORD_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.SWORD_VS_ROBE; + } + } + + if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.POLE && skill != null) + { + L2Armor armor = ((L2PcInstance) target).getActiveChestArmorItem(); + if (armor != null) + { + if (((L2PcInstance) target).isWearingHeavyArmor()) + damage /= Config.POLE_VS_HEAVY; + if (((L2PcInstance) target).isWearingLightArmor()) + damage /= Config.POLE_VS_LIGHT; + if (((L2PcInstance) target).isWearingMagicArmor()) + damage /= Config.POLE_VS_ROBE; + } + } //if (!(attacker instanceof L2RaidBossInstance) && /* if ((attacker instanceof L2NpcInstance || attacker instanceof L2SiegeGuardInstance)) Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 3695) +++ java/net/sf/l2j/Config.java (working copy) @@ -881,7 +881,30 @@ public static boolean L2JMOD_WEDDING_SAMESEX; public static boolean L2JMOD_WEDDING_FORMALWEAR; public static int L2JMOD_WEDDING_DIVORCE_COSTS; - + + /** Class Balances */ + public static float DAGGER_VS_HEAVY; + public static float DAGGER_VS_LIGHT; + public static float DAGGER_VS_ROBE; + public static float ARCHER_VS_HEAVY; + public static float ARCHER_VS_LIGHT; + public static float ARCHER_VS_ROBE; + public static float BLUNT_VS_HEAVY; + public static float BLUNT_VS_LIGHT; + public static float BLUNT_VS_ROBE; + public static float FIST_VS_HEAVY; + public static float FIST_VS_LIGHT; + public static float FIST_VS_ROBE; + public static float DUAL_VS_HEAVY; + public static float DUAL_VS_LIGHT; + public static float DUAL_VS_ROBE; + public static float SWORD_VS_HEAVY; + public static float SWORD_VS_LIGHT; + public static float SWORD_VS_ROBE; + public static float POLE_VS_HEAVY; + public static float POLE_VS_LIGHT; + public static float POLE_VS_ROBE; + // Packet information /** Count the amount of packets per minute ? */ public static boolean COUNT_PACKETS = false; @@ -1848,6 +1871,34 @@ TVT_EVENT_RUNNING_TIME = Integer.parseInt(L2JModSettings.getProperty("TvTEventRunningTime", "1800")); TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(L2JModSettings.getProperty("TvTEventParticipationNpcId", "0")); + DAGGER_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("DaggerVsHeavy", "2.50")); + DAGGER_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("DaggerVsHeavy", "2.00")); + DAGGER_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("DaggerVsHeavy", "1.80")); + + ARCHER_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("ArcherVsHeavy", "2.50")); + ARCHER_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("ArcherVsHeavy", "2.00")); + ARCHER_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("ArcherVsHeavy", "1.80")); + + BLUNT_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("BluntVsHeavy", "2.50")); + BLUNT_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("BluntVsHeavy", "2.00")); + BLUNT_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("BluntVsHeavy", "1.80")); + + FIST_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("FistVsHeavy", "2.50")); + FIST_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("FistVsHeavy", "2.00")); + FIST_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("FistVsHeavy", "1.80")); + + DUAL_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("DualVsHeavy", "2.50")); + DUAL_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("DualVsHeavy", "2.00")); + DUAL_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("DualVsHeavy", "1.80")); + + SWORD_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("SwordVsHeavy", "2.50")); + SWORD_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("SwordVsHeavy", "2.00")); + SWORD_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("SwordVsHeavy", "1.80")); + + POLE_VS_HEAVY = Float.parseFloat(L2JModSettings.getProperty("PoleVsHeavy", "2.50")); + POLE_VS_LIGHT = Float.parseFloat(L2JModSettings.getProperty("PoleVsHeavy", "2.00")); + POLE_VS_ROBE = Float.parseFloat(L2JModSettings.getProperty("PoleVsHeavy", "1.80")); + /** L2JMOD Wedding system */ L2JMOD_ALLOW_WEDDING = Boolean.valueOf(L2JModSettings.getProperty("AllowWedding", "False")); L2JMOD_WEDDING_PRICE = Integer.parseInt(L2JModSettings.getProperty("WeddingPrice", "250000000")); Index: java/config/l2jmods.properties =================================================================== --- java/config/l2jmods.properties (revision 3695) +++ java/config/l2jmods.properties (working copy) @@ -132,3 +132,52 @@ # ex.: 1;2;3;4;5;6 # no ";" at the start or end TvTEventDoorsCloseOpenOnStartEnd = + +#--------------------------------------------- +# Balance Dagger Classes - +#--------------------------------------------- +DaggerVsHeavy = 2.50 +DaggerVsLight = 2.00 +DaggerVsRobe = 1.80 + +#--------------------------------------------- +# Balance Archer Classes - +#--------------------------------------------- +ArcherVsHeavy = 2.50 +ArcherVsLight = 2.00 +ArcherVsRobe = 1.80 + +#--------------------------------------------- +# Balance Blunt Classes - +#--------------------------------------------- +BluntVsHeavy = 2.50 +BluntVsLight = 2.00 +BluntVsRobe = 1.80 + +#--------------------------------------------- +# Balance Dual-Weapon Classes - +#--------------------------------------------- +DualVsHeavy = 2.50 +DualVsLight = 2.00 +DualVsRobe = 1.80 + +#--------------------------------------------- +# Balance Fist Classes - +#--------------------------------------------- +FistVsHeavy = 2.50 +FistVsLight = 2.00 +FistVsRobe = 1.80 + +#--------------------------------------------- +# Balance Sword Classes - +#--------------------------------------------- +SwordVsHeavy = 2.50 +SwordVsLight = 2.00 +SwordVsRobe = 1.80 + +#--------------------------------------------- +# Balance Pole Classes - +#--------------------------------------------- +PoleVsHeavy = 2.50 +PoleVsLight = 2.00 +PoleVsRobe = 1.80
×
×
  • Create New...