Jump to content

GoldenNightmare

Members
  • Posts

    273
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by GoldenNightmare

  1. vrika ti ftaiei to sql arxio dn perniotan k to perasa xirokinita alla dn kaneis pos mporo na to kano na pari to sql

     

    INSERT INTO `custom_npc` (`id`, `idTemplate`, `name`, `serverSideName`, `title`, `serverSideTitle`, `class`, `collision_radius`, `collision_height`, `level`, `sex`, `type`, `attackrange`, `hp`, `mp`, `hpreg`, `mpreg`, `str`, `con`, `dex`, `int`, `wit`, `men`, `exp`, `sp`, `patk`, `pdef`, `matk`, `mdef`, `atkspd`, `aggro`, `matkspd`, `rhand`, `lhand`, `armor`, `enchant`, `walkspd`, `runspd`, `isUndead`, `absorb_level`, `absorb_type`, `drop_herbs`) VALUES

    ('55561', 13001, 'Power of Dark', 1, 'Core', 1, 'NPC.heart_of_warding', '42.50', '75.00', '85', 'female', 'L2GrandBoss', 0, '200000', '3793', '0.00', '0.00', '60', '57', '73', '76', '70', '80', '2374400', '1196456', '0', '5000', '0', '6000', '0', '0', '0', '0', '0', '0', 0, '0', '0', 0, '0', 'FULL_PARTY', 'false'),

    ('55562', 13001, 'Power of Ligth', 1, 'Core', 1, 'NPC.heart_of_warding', '42.50', '75.00', '85', 'female', 'L2GrandBoss', 0, '200000', '3793', '0.00', '0.00', '60', '57', '73', '76', '70', '80', '2374400', '1196456', '0', '5000', '0', '6000', '0', '0', '0', '0', '0', '0', 0, '0', '0', 0, '0', 'FULL_PARTY', 'false'),

    ('55558', 32130, 'Atome', 1, 'Capture The Base', 1, 'LineageMonster3.king_of_cat', '6.00', '16.01', '80', 'male', 'L2Npc', 40, '6053', '2143', '13.43', '3.09', '40', '43', '30', '21', '20', '25', '0', '0', '2646', '633', '2006', '593', '278', '0', '333', '0', '0', '0', 0, '52', '198', 0, '0', 'LAST_HIT', 'false');

  2. Guys katevasa x8es ena event capture the base apo to maxcheaters to evala ola ok kai to ekana na arxizi me 2 atoma

    alla otan dilonoune kai perimenoune dn arxizi leei registration canceled due lack of player kai kati allo pos ginete na to vazo ayto ka8e dio ores px san to tvt tis l2j edo einai to __init__.py please help. :-\

     

    import sys

    from com.l2jserver.gameserver.model.quest import State

    from com.l2jserver.gameserver.model.quest import QuestState

    from com.l2jserver.gameserver.datatables import DoorTable

    from com.l2jserver.gameserver.datatables import SkillTable

    from com.l2jserver.gameserver.model import L2Skill

    from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest

    from com.l2jserver.gameserver import Announcements

    from com.l2jserver import L2DatabaseFactory

    from com.l2jserver.gameserver.ai import CtrlIntention

    from com.l2jserver.util import Rnd

    from java.lang import System

    from com.l2jserver.gameserver.model import L2World

    qn = "5556_Base"

    closed=1

    res_timer=0

    npc1=0

    npc2=0

    TEAM1 = []

    TEAM2 = []

    attacked = 0

    annom = 1

    NAME = "ZAHVAT BAZI"

    LOC = "Goddard"

    REGISTER = 55558

    locr = [147712,-55520,-2733]

    PENI = 57

    PENI_KOL = 100000000

    LEVEL = 76

    AFTER_RESTART = 5

    TIME_FOR_WAIT = 350

    TIME_FOR_REG = 3

    ANNOUNCE_INTERVAL = 2

    YCH_MIN = 3

    YCH_MAX = 20

    REWARD =[[9552,3,40],[9553,3,40],[9554,3,40],[9555,3,40],[9556,3,40],[9557,3,40]]

    t1 =[81431,-16025,-1855]

    t2 =[85162,-16759,-1829]

    BASE1 = 55561

    BASE2 = 55562

    com1 = "Dark power"

    com2 = "Light power"

    RES_TIME = 8

     

     

    class Quest (JQuest) :

    def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

     

    def init_LoadGlobalData(self) :

      self.startQuestTimer("open", AFTER_RESTART *60000, None, None)

      return

     

    def onTalk (Self,npc,player):

      global TEAM1,TEAM2,npc1,npc2,closed

      st = player.getQuestState(qn)

      npcId = npc.getNpcId()

      if npcId == REGISTER:

      if closed<>1:

        if not player.isInOlympiadMode() :

        if player.getLevel() >= LEVEL:

          if player.getName() not in TEAM1 + TEAM2 :

          if len(TEAM1)>len(TEAM2) :

            kolych = len(TEAM1)

          else:

            kolych = len(TEAM2)

          if kolych <= YCH_MAX :

            if PENI_KOL<>0: 

            if st.getQuestItemsCount(PENI)>PENI_KOL:

              st.takeItems(PENI,PENI_KOL)

              if len(TEAM1)>len(TEAM2):

                TEAM2.append(player.getName())

                return "reg.htm"

              else:

                TEAM1.append(player.getName())

                return "reg.htm"

            else:

              st.exitQuest(1)

              return "nopeni.htm"

            else:

              if len(TEAM1)>len(TEAM2):

                TEAM2.append(player.getName())

                return "reg.htm"

              else:

                TEAM1.append(player.getName())

                return "reg.htm"

          else:

            return "max.htm"

          else:

          return "yje.htm"

        else:

          return "lvl.htm"

        else:

        return "You register in olympiad games now"

      else:

        return "noreg.htm"

      return

     

    def onAdvEvent (self,event,npc,player):

      global TEAM1,TEAM2,npc1,npc2,res_timer,annom,closed

      if event == "open" :

        TEAM1=[]

        TEAM2=[]

        closed=0

        annom=1

        npc=self.addSpawn(REGISTER,locr[0],locr[1],locr[2],30000,False,0)

        self.startQuestTimer("close", TIME_FOR_REG*60000, npc, None)

        self.startQuestTimer("announce", ANNOUNCE_INTERVAL*60000, None, None)

        Announcements.getInstance().announceToAll("Opened registration for "+str(NAME)+" event! You can register in "+str(LOC)+".")

      if event == "close":

        res_timer = 1

        self.startQuestTimer("res", RES_TIME*1000, None, None)

        self.startQuestTimer("open", TIME_FOR_WAIT*60000, None, None)

        for nm in TEAM1:

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

          if not i.isOnline() or i.isInOlympiadMode():

          TEAM1.remove(nm)

        else:

          TEAM1.remove(nm)

        for nm in TEAM2:

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

          if not i.isOnline() or i.isInOlympiadMode():

          TEAM2.remove(nm)

        else:

          TEAM2.remove(nm)

        while abs(len(TEAM1)-len(TEAM2))>1:

        if len(TEAM1)>len(TEAM2):

          self.saveGlobalQuestVar(str(TEAM1[0].getObjectId()), "team2")

          TEAM2.append(TEAM1[0])

          TEAM1.remove(TEAM1[0])

        else:

          self.saveGlobalQuestVar(str(TEAM2[0].getObjectId()), "team1")

          TEAM1.append(TEAM2[0])

          TEAM2.remove(TEAM2[0])

        if (len(TEAM1)+len(TEAM2))< 2*YCH_MIN :

          npc.deleteMe()

          closed=1

          Announcements.getInstance().announceToAll("Event "+str(NAME)+" was canceled due lack of participation.")

        else:

          closed=1

          Announcements.getInstance().announceToAll("Event "+str(NAME)+" has started!")

          npc.deleteMe()

          npc1=self.addSpawn(BASE1,t1[0],t1[1],t1[2],30000,False,0)

          npc2=self.addSpawn(BASE2,t2[0],t2[1],t2[2],30000,False,0)

          for nm in TEAM1 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

            if i.isOnline() :

            i.stopAllEffects()

            i.setTeam(2)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

            i.teleToLocation(t1[0]+100,t1[1],t1[2])

          for nm in TEAM2 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

            if i.isOnline() :

            i.stopAllEffects()

            i.setTeam(1)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

            i.teleToLocation(t2[0]+100,t2[1],t2[2])

      if event == "announce" and closed==0 and (TIME_FOR_REG - ANNOUNCE_INTERVAL * annom)>0:

        Announcements.getInstance().announceToAll(str(TIME_FOR_REG - ANNOUNCE_INTERVAL * annom ) + " minutes until event "+str(NAME)+" will start! You can register in "+str(LOC)+". There are "+str(len(TEAM1))+" Dark warriors and "+str(len(TEAM2))+" Heroes of Light.")

        annom=annom+1

        self.startQuestTimer("announce", ANNOUNCE_INTERVAL*60000, None, None)

      if event == "return_1" :

        res_timer = 0

        for nm in TEAM1 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

          if i.isOnline() :

            i.teleToLocation(locr[0],locr[1],locr[2])

            i.setTeam(0)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

        for nm in TEAM2 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

          if i.isOnline() :

            i.teleToLocation(locr[0],locr[1],locr[2])

            i.setTeam(0)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

        Announcements.getInstance().announceToAll("Event "+str(NAME)+" has ended. "+str(com1)+" win!")

      if event == "return_2" :

        res_timer = 0

        for nm in TEAM1 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

          if i.isOnline() :

            i.teleToLocation(locr[0],locr[1],locr[2])

            i.setTeam(0)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

        for nm in TEAM2 :

          i=L2World.getInstance().getPlayer(nm)

          if i<>None:

          if i.isOnline() :

            i.teleToLocation(locr[0],locr[1],locr[2])

            i.setTeam(0)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

        Announcements.getInstance().announceToAll("Event "+str(NAME)+" has ended. "+str(com2)+" win!")

      if event == "exit" :

        if player.getName() in TEAM1:

          TEAM1.remove(player.getName())

        else:

          TEAM2.remove(player.getName())

        return "exit.htm"

      if event == "res" and res_timer==1:

        self.startQuestTimer("res", RES_TIME*1000, None, None)

        for nm in TEAM1:

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

          if i.isOnline() :

          if i.isDead():

            i.doRevive()

            i.setCurrentCp(i.getMaxCp())

            i.setCurrentHp(i.getMaxHp())

            i.setCurrentMp(i.getMaxMp())

            i.stopAllEffects()

            i.setTeam(0)

            i.setTeam(2)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

            i.teleToLocation(t1[0],t1[1],t1[2])

        for nm in TEAM2:

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

          if i.isOnline() :

          if i.isDead():

            i.doRevive()

            i.setCurrentCp(i.getMaxCp())

            i.setCurrentHp(i.getMaxHp())

            i.setCurrentMp(i.getMaxMp())

            i.stopAllEffects()

            i.setTeam(0)

            i.setTeam(1)

            i.broadcastStatusUpdate()

            i.broadcastUserInfo()

            i.teleToLocation(t2[0],t2[1],t2[2])

      return

     

    def onAttack (self,npc,player,damage,isPet,npcId):

      npcId = npc.getNpcId()

      if npcId == BASE2 and player.getName() not in TEAM1 :

        #player.reduceCurrentHp(99999,player) 

          player.teleToLocation(85359,-17786,-1833)

      if npcId == BASE1 and player.getName() not in TEAM2 :

        #player.reduceCurrentHp(99999,player) 

          player.teleToLocation(80153,-16204,-1819)

      return 

     

    def onSkillSee (self,npc,player,skill,targets,isPet) :

        if player.getTarget() == npc and skill.getId() in [1218,1015,1258,1011,1401,58,1217,329]:

          player.setTeam(0)

          player.broadcastStatusUpdate()

          player.broadcastUserInfo()     

          player.teleToLocation(locr[0],locr[1],locr[2])

          if player.getName() in TEAM1 :

          TEAM1.remove(player.getName())

          elif player.getName() in TEAM2 :

          TEAM2.remove(player.getName())

     

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

      global TEAM1,TEAM2,npc1,npc2,res_timer

      npcId = npc.getNpcId()

      if npcId == BASE1:

      res_timer=0

      self.startQuestTimer("return_2", 10000, None, None) 

      npc2.deleteMe()

      for nm in TEAM2 :

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

        if i.isOnline() :

          for id, count, chance in REWARD :

          if Rnd.get(100)<=chance :

            i.getQuestState(qn).giveItems(8570,12)

      if npcId == BASE2:

      res_timer=0

      self.startQuestTimer("return_1", 10000, None, None)

      npc1.deleteMe()

      for nm in TEAM1 :

        i=L2World.getInstance().getPlayer(nm)

        if i<>None:

        if i.isOnline() :

          for id, count, chance in REWARD :

          if Rnd.get(100)<=chance :

            i.getQuestState(qn).giveItems(8570,12)

      return

     

    QUEST = Quest(5556, qn, "Base")

     

    QUEST.addKillId(int(BASE1))

    QUEST.addAttackId(int(BASE1))

    QUEST.addKillId(int(BASE2))

    QUEST.addAttackId(int(BASE2))

    QUEST.addStartNpc(int(REGISTER))

    QUEST.addTalkId(int(REGISTER))

    QUEST.addSkillSeeId(int(BASE1))

    QUEST.addSkillSeeId(int(BASE2))

  3. ok to ekana alla exo allo ena prob epidi einai sto seed of destruction k otan mpenis 8eli party petaei tous pektes stin eisodo tou instance pos tha vgalo to na min 8eli party gia na mpis ?

     

    private boolean checkConditions(L2PcInstance player)

    {

    if (debug)

    return true;

    L2Party party = player.getParty();

    if (party == null)

    {

    player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOT_IN_PARTY_CANT_ENTER));

    return false;

    }

    L2CommandChannel channel = player.getParty().getCommandChannel();

    if (channel == null)

    {

    player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOT_IN_COMMAND_CHANNEL_CANT_ENTER));

    return false;

    }

    else if (channel.getChannelLeader() != player)

    {

    player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER));

    return false;

    }

    else if (channel.getMemberCount() < MIN_PLAYERS || channel.getMemberCount() > MAX_PLAYERS)

    {

    player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER));

    return false;

    }

    for (L2PcInstance partyMember : party.getPartyMembers())

    {

    if (partyMember.getLevel() < 75)

    {

    SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_LEVEL_REQUIREMENT_NOT_SUFFICIENT);

    sm.addPcName(partyMember);

    party.broadcastToPartyMembers(sm);

    return false;

    }

    if (!Util.checkIfInRange(1000, player, partyMember, true))

    {

    SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_LOCATION_THAT_CANNOT_BE_ENTERED);

    sm.addPcName(partyMember);

    party.broadcastToPartyMembers(sm);

    return false;

    }

    Long reentertime = InstanceManager.getInstance().getInstanceTime(partyMember.getObjectId(), INSTANCEID);

    if (System.currentTimeMillis() < reentertime)

    {

    SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_MAY_NOT_REENTER_YET);

    sm.addPcName(partyMember);

    party.broadcastToPartyMembers(sm);

    return false;

    }

    }

    return true;

    }

     

    apo edo kati allazo alla ti ? :-\

  4. # ---------------------------------------------------------------------------

    # Team vs. Team Event Engine (by FBIagent)

    # ---------------------------------------------------------------------------

    # <u><b><font color="red">WARNING: this mod require custom NPC table support turned on !</font></b></u>

    # CustomNpcTable = True in General.properties

    # ---------------------------------------------------------------------------

    # Enable/Disable TvTEvent System

    TvTEventEnabled = True

     

    # TvT in instance

    TvTEventInInstance = True

     

    # Name of the instance file for TvT

    TvTEventInstanceFile = coliseum.xml

     

    # Times TvT will occur (24h format).

    TvTEventInterval = 8:00,10:00,12:00,14:00,16:00,18:00,20:00,22:00,00:00,2:00,4:00,6:00

     

    # Registration timer from start of event (in minutes).

    TvTEventParticipationTime = 5

     

    # Event running time (in minutes).

    TvTEventRunningTime = 10

     

    # TvT Event NPC (create a custom npc of type L2TvTEventNpc).

    TvTEventParticipationNpcId = 70010

     

    # TvT Event Participation Fee (itemId, number). Fee is not returned.

    # Example: 57,100000

    # Default = none

    TvTEventParticipationFee = 57,100000

     

    # Location for TvTEvent NPC to spawn in form x,y,z[,heading]

    TvTEventParticipationNpcCoordinates = 82698,148638,-3473

     

    # Min/Max amount of players allowed in each team.

    TvTEventMinPlayersInTeams = 1

    TvTEventMaxPlayersInTeams = 20

     

    # Min/Max level of players that may join the event.

    TvTEventMinPlayerLevel = 1

    TvTEventMaxPlayerLevel = 85

     

    # Repsawn and exit delay timers (in seconds).

    TvTEventRespawnTeleportDelay = 10

    TvTEventStartLeaveTeleportDelay = 10

     

    # First Team - Name, Start/Death x,y,z location.

    TvTEventTeam1Name = Team1

    TvTEventTeam1Coordinates = 148695,46725,-3414

     

    # Second Team - Name, Start/Death x,y,z location.

    TvTEventTeam2Name = Team2

    TvTEventTeam2Coordinates = 149999,46728,-3414

     

    # Reward for winning team.

    # Example: TvTEventReward = itemId,amount;itemId,amount;itemId,amount

    TvTEventReward = 8570,16

     

    # TvTEvent Rules

    TvTEventTargetTeamMembersAllowed = True

    TvTEventScrollsAllowed = False

    TvTEventPotionsAllowed = True

    TvTEventSummonByItemAllowed = False

     

    # Door ID's to open/close on start/end.

    # Not supported in instance, use xml template for defining doors.

    # Example: TvTDoorsToOpen = 1;2;3;4;5;6

    TvTDoorsToOpen =

    TvTDoorsToClose =

     

    # Should both teams get reward if there's a tie?

    TvTRewardTeamTie = False

     

    # Participant's effects handling on teleport/death.

    # Effects lasting through death never removed.

    # 0 - always remove all effects.

    # 1 - remove all effects only during port to event (noblesse blessing can be used)

    # 2 - never remove any effect

    # Default: 0

    TvTEventEffectsRemoval = 0

     

    # Fighter-class participants will be buffed with those buffs each respawn

    # Format: skill1Id,skill1Level;skill2Id,skill2Level...

    # Example: 1504,1;1501,1;1502,1;1499,1

    TvTEventFighterBuffs =1504,1;1501,1;1502,1;1499,1,1519,1

     

    # Mage-class participants will be buffed with those buffs each respawn

    # Format: skill1Id,skill1Level;skill2Id,skill2Level...

    # Example: 1504,1;1500,1;1501,1;1085,3

    TvTEventMageBuffs =1504,1;1500,1;1501,1;1085,3

     

    # Maximum number of allowed participants per IP address (dualbox check)

    # Default: 0 (no limits)

    TvTEventMaxParticipantsPerIP = 0

     

    # Voiced command (.tvt) working during TVT event to get information about event status

    TvTAllowVoicedInfoCommand = True

     

    Pos Ginete  na valo to tvt sto seed of destruction otan vazo ta team coordinates kai arxizo ton server leei tvt engine is disabled exo dokimasi me kai xoris tvt instance kai pali m to leei ayto pos ginete na to valo ?otan to exo sto coli litourgi kanonika

×
×
  • Create New...