Jump to content

estaz

VIP Member
  • Posts

    88
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by estaz

  1. bump

     

    ---- edited

    Okey, here is the .py file, error and the lines i edited :

     

    The File

    Red lines - the edited

     

     

    qn = "Bloodshedparty"

     

    #Items

    E_APIGA = 14720

    ADENA = 57

    STONE = 9576

    STONE82 = 10486

    STONE84 = 14169

    SCROLL = 960

    SCROLLB = 6577

    GOLDDRAGON = 3481

    ECCACOIN        = 4037

     

    #NPCs

    ROSE = 2009001

    CHEST = 2010010

     

    #FIRST CHAMBER MOBS

    GUARD = 2010001

    KEYKEEPER = 2010013

    PROTECTOR = 2010005

     

    BELETH = 2010007

    BAYLOR = 2010008

    TIAT = 2010009

     

    #Doors

    DOOR = 20240001

    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):

    party = player.getParty()

    if not party:

    player.sendPacket(ExShowScreenMessage("You are not currently in a party, so you cannot enter.", 8000))

    return False

    if party and party.getMemberCount() < 2:

    player.sendPacket(ExShowScreenMessage("You cannot enter because there is too less people in your party. Minimum is 6 people.", 8000))

    return False

     

    for partyMember in party.getPartyMembers().toArray():

    if partyMember.getLevel() < 80:

    player.sendPacket(SystemMessage.sendString(partyMember.getName()+"s level is too low and cannot be entered."))

    return False

    if not Util.checkIfInRange(1000, player, partyMember, True) and new:

    player.sendPacket(SystemMessage.sendString(partyMember.getName()+" is too far away ask him to come here."))

    return False

     

    return True

     

    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

    self.worlds[instanceId]=world

    self.world_ids.append(instanceId)

    print "Instance: Started " + template + " Instance: " +str(instanceId) + " created by " + str(player.getName())

    teleto.instanceId = instanceId

    for partyMember in party.getPartyMembers().toArray():

    teleportplayer(self,partyMember,teleto)

    return instanceId

    return instanceId

     

    def exitInstance(player,tele):

    party = player.getParty()

    if party :

    for partyMember in party.getPartyMembers().toArray():

    partyMember.setInstanceId(0)

    partyMember.teleToLocation(tele.x, tele.y, tele.z)

    pet = partyMember.getPet()

    if pet != None :

    pet.setInstanceId(0)

    pet.teleToLocation(tele.x, tele.y, tele.z)

    else :

    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)

    InstanceManager.getInstance().destroyInstance(player.getInstanceId())

     

    class Bloodshedparty(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 :

                  if st.getQuestItemsCount(ECCACOIN) >= 4 :

                    htmltext =  "2009002.htm"

                        else :

                            st.takeItems(ECCACOIN,5)

    tele = PyObject()

    tele.x = 16345

    tele.y = 209051

    tele.z = -9357

    enterInstance(self, player, "Bloodshedparty.xml", tele)

    st.playSound("ItemSound.quest_middle")

    elif npcId == CHEST :

    npc.decayMe()

    tele = PyObject()

    tele.x = 82200

    tele.y = 148347

    tele.z = -3467

    party = player.getParty()

    if party :

    for partyMember in party.getPartyMembers().toArray():

    exitInstance(partyMember,tele)

    else:

    exitInstance(player,tele)

    st.giveItems(ADENA,10000)

    if Rnd.get(100) < 10 :

    st.giveItems(STONE84,1)

    if Rnd.get(100) < 15 :

    st.giveItems(STONE82,1)

    if Rnd.get(100) < 25 :

    st.giveItems(STONE,1)

    if Rnd.get(100) < 25 :

    st.giveItems(SCROLLB,1)

    if Rnd.get(100) < 50 :

    st.giveItems(SCROLL,1)

    st.playSound("ItemSound.quest_finish")

    player.sendPacket(ExShowScreenMessage("This world was destroyed: Completed", 8000))

    player.sendPacket(ExShowScreenMessage("Baylor: You fools, We will meet in your world soon.....Aha ha ha", 15000))

    return

     

    def onKill(self,npc,player,isPet):

    st = player.getQuestState(qn)

    npcId = npc.getNpcId()

    if npcId == GUARD :

    if npc.getInstanceId() in self.worlds:

    world = self.worlds[npc.getInstanceId()]

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me! I failed"))

    #newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)

    newNpc = self.addSpawn(PROTECTOR,16658,211498,-9357,0,False,0,False,npc.instanceId)

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "You fools, here's your end"))

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Ooo...It is a good day to die"))

    openDoor(DOOR,npc.instanceId)

    elif npcId == PROTECTOR :

    if npc.getInstanceId() in self.worlds:

    world = self.worlds[npc.getInstanceId()]

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Master, Forgive Me!"))

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "I failed, give me another chance to protect you"))

    st.giveItems(E_APIGA,2)

    player.sendPacket(ExShowScreenMessage("Fools, here's your end!", 8000))

    #newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)

    newNpc = self.addSpawn(BELETH,16344,213091,-9356,0,False,0,False,npc.instanceId)

    player.sendPacket(Earthquake(16344,213091,-9356,20,5))

    elif npcId == BELETH :

    if npc.getInstanceId() in self.worlds:

    world = self.worlds[npc.getInstanceId()]

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "My world....."))

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "Baylorrrrr"))

    st.giveItems(E_APIGA,2)

    player.sendPacket(ExShowScreenMessage("Baylor:My Brother, I will avenge you!", 12000))

    #newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)

    newNpc = self.addSpawn(BAYLOR,16344,213091,-9356,0,False,0,False,npc.instanceId)

    player.sendPacket(Earthquake(16344,213091,-9356,20,5))

    elif npcId == BAYLOR :

    if npc.getInstanceId() in self.worlds:

    world = self.worlds[npc.getInstanceId()]

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "My death is nothing, your end is near"))

    player.sendPacket(CreatureSay(npc.getObjectId(), 0, npc.getName(), "You fools ....Aha ha ha ha"))

    st.giveItems(E_APIGA,1)

    player.sendPacket(ExShowScreenMessage("..............kill them all!", 8000))

    #newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)

    newNpc = self.addSpawn(TIAT,16344,213091,-9356,0,False,0,False,npc.instanceId)

    player.sendPacket(Earthquake(16344,213091,-9356,80,5))

    elif npcId == TIAT :

    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.", 12000))

    st.playSound("ItemSound.quest_finish")

    st.giveItems(E_APIGA,4)

    st.giveItems(GOLDDRAGON,4)

    #newNpc = self.addSpawn(int npcId,x,y,z,heading,randomOffset,despawnDelay,isSummonSpawn,instanceId)

    newNpc = self.addSpawn(CHEST,16225,213040,-9357,0,False,0,False,npc.instanceId)

    return

     

    QUEST = Bloodshedparty(-1, qn, "Bloodshedparty")

    QUEST.addStartNpc(ROSE)

    QUEST.addTalkId(ROSE)

    QUEST.addTalkId(CHEST)

     

    QUEST.addKillId(GUARD)

    QUEST.addKillId(PROTECTOR)

    QUEST.addKillId(BELETH)

    QUEST.addKillId(BAYLOR)

    QUEST.addKillId(TIAT)

     

     

    the error:

    Line: -1 - Column: -1
    
    Traceback (innermost last):
      (no code object) at line 0
    SyntaxError: ('invalid syntax', ('__init__.py', 160, 17, '                if st.getQuestItemsCount(ECCACOIN) >= 4 :'))
    

     

    Why does this error appear? Do i need to add something in the checkConditions section or what?

  2. Sorry, every file, except Gracia_heart in teleports are rewritten in java  :-\

    After a fev. sec. i will upload the .py error..

    And this is the error, when i load the instance not in py file but in java, because i have it in java too, but still:

    1. ERROR in \BloodShedParty.java (at line 72)
            public BSPWorld()
                   ^^^^^^^^^^
    No enclosing instance of type InstanceManager is accessible to invoke the super
    constructor. Must define a constructor and explicitly qualify its super construc
    tor invocation with an instance of InstanceManager (e.g. x.super() where x is an
    instance of InstanceManager).
    ----------
    2. WARNING in \BloodShedParty.java (at line 374)
            private int GetKilledMobs(int npcId)
                        ^^^^^^^^^^^^^^^^^^^^^^^^
    The method GetKilledMobs(int) from the type BloodShedParty is never used locally

  3. Well, first of all, this is not right section for it (help) you should post it here in [Request] Dev Help [L2J] En (http://www.maxcheaters.com/forum/index.php?board=64.0).

    Second, you can try to change the amount of memory used by your server, because the error shows that its OutOfMemory. Its easy -  just change the taking memory amount by server in REM java -server line or in java -Djava in starGameserver.bat file.

  4. Hello everyone :)

     

    I have created a list of engines, events, npcs and official addons and fixes, that i cant code it by myself, so im searching for a good, trusted developer, who is willing to code those for me.

     

    There are 6 engines, 6 events, 7 npcs and for now only 2 official addons, but i think thats too much for the start, so now i need only one engine and and one npc for that engine.

     

    What you will get, if you'll code it:

     

    1. Your payment, ofcourse :D

    2. Guaranteed work and payment for the rest of engines and events (not, if you dont want it)

     

    -- edited: i changed a bit the first engine.

     

    What about that engine that you'll need to code? Well, main things of that engine are:

    -- It's a zone ( Lair of Antharas or MoS )

    -- There are no npcs (except monsters )

    To get to that place, player has to buy custom scroll.

    -- Player can be there only 60 minutes, 120 minutes (like in an instance)

    While being there, player always will have pvp flag on him  :D

     

    -- edited: if you can do it like an instance it would be great, but i dont know if its possible to enter an instance where there would be more than one player and they can fight..

    -- edited: if it isn't possible to do it like an instance, you can give me your ideas and suggestions!

     

    Oh, and it would be good, if you could give me a proof of work before getting your payment ;)

     

    More info about payment and engine - pm me.

     

     - estaz

     

  5. Here is the error log:

    1. ERROR in \Leodas.java (at line 64)
            HellboundManager.getInstance().decTrust(1000); //value needs to be updat
    ed
                                           ^^^^^^^^
    The method decTrust(int) is undefined for the type HellboundManager

     

  6. Hello everyone :)

     

      I have a problem with hellbound boss - Leodas.

    In his Leodas.java file there is line :

    HellboundManager.getInstance().decTrust(1000); //value needs to be updated 
    	leodasOnAttack = false;

    But when i start the server, it drops me an error, which says that decTrust isn't the right command for hellboundmanager.

    I Tried to set it to setTrust and getTrust, but still it droped me an error.

    So, I am asking if someone knows what type of command have to be there.

     

    Thank you.

     

      - estaz

  7. Hello again ;)

     

    I have a problem with hellbound now.

    I have completed a quest Path to Hellbound, and warpgate is teleporting me to hellbound already?

    You have to complete Thats Bloody Hot quest too to enter hellbound, but i can enter the island without completion of the quest.

     

    package custom.HellboundIsland;
    
    import L2j.Infinity.gameserver.instancemanager.hellbound.HellboundManager;
    import L2j.Infinity.gameserver.model.actor.L2Npc;
    import L2j.Infinity.gameserver.model.actor.instance.L2PcInstance;
    import L2j.Infinity.gameserver.model.quest.Quest;
    import L2j.Infinity.gameserver.model.quest.State;
    import L2j.Infinity.gameserver.model.quest.QuestState;
    
    public class HellboundIsland extends Quest
    {
    private static final String THATS_BLOODY_HOT = "133_ThatsBloodyHot";
    private static final String PATH_TO_HELLBOUND = "130_PathToHellbound";
    
    private final static int[] npcIds = { 32314, 32315, 32316, 32317, 32318, 32319 };
    
    public HellboundIsland(int questId, String name, String descr)
    {
    	super(questId, name, descr);
    	for (final int id : npcIds)
    	{
    		addStartNpc(id);
    		addFirstTalkId(id);
    		addTalkId(id);
    	}
    }
    
    private static final boolean canEnter(L2PcInstance player)
    {
    	if (player.isFlying())
    		return false;
    
    	QuestState st;
    	if (!HellboundManager.getInstance().isLocked())
    	{
    		st = player.getQuestState(PATH_TO_HELLBOUND);
    		if (st != null && st.getState() == State.COMPLETED)
    			return true;
    	}
    
    	st = player.getQuestState(THATS_BLOODY_HOT);
    	if (st != null && st.getState() == State.COMPLETED)
    		return true;
    
    	return false;
    }
    
    @Override
    public final String onFirstTalk(L2Npc npc, L2PcInstance player)
    {
    	if (!canEnter(player))
    	{
    		if (HellboundManager.getInstance().isLocked())
    			return "warpgate-locked.htm";
    	}
    
    	return npc.getNpcId() + ".htm";
    }
    
    @Override
    public final String onTalk(L2Npc npc, L2PcInstance player)
    {
    	if (!canEnter(player))
    		return "warpgate-no.htm";
    
    	player.teleToLocation(-11272, 236464, -3248, true);
    	HellboundManager.getInstance().unlock();
    	return null;
    }
    
    public static void main(String[] args)
    {
    	new HellboundIsland(-1, "HellboundIsland", "custom");
    }
    }
    

     

    I think, that this code shows, that it is checking, if Thats bloody Hot quest is completed, but then why it allows to teleport??

     

    - estaz

×
×
  • 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