Jump to content

Recommended Posts

Posted

import sys

from com.l2jfree                                  import Config

from com.l2jfree                                  import L2DatabaseFactory

from com.l2jfree.gameserver.datatables            import CharTemplateTable

from com.l2jfree.gameserver.communitybbs.Manager  import RegionBBSManager

from com.l2jfree.gameserver.model                import L2World

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

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

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

from com.l2jfree.gameserver.network.serverpackets import EtcStatusUpdate

from com.l2jfree.gameserver.network.serverpackets import PledgeShowInfoUpdate

from com.l2jfree.tools.random                    import Rnd

 

qn = "8700_Services"

 

NPC = 8700

 

 

# Items

Item = 3481

GenreCount = 10

 

print "INFO Loaded: 8700_Services"

 

 

def AutoChat(npc, text) :

  chars = npc.getKnownList().getKnownPlayers().values().toArray()

  if chars != None :

    for pc in chars :

      sm = NpcSay(npc.getObjectId(), 0, npc.getNpcId(), text)

      pc.sendPacket(sm)

 

class Quest (JQuest) :

 

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

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

 

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

    st = player.getQuestState(qn)

    htmltext = event

 

    if event == "changeGenre" :

      if st.getQuestItemsCount(Item) < GenreCount :

        htmltext = "cant.htm"

      elif player.isCursedWeaponEquipped() :

        AutoChat(npc, player.getName()+" you can't change your genre when you are equipped with a Cursed Weapon.")

        htmltext = "cant.htm"

      else :

        if player.getAppearance().getSex() == 1 :

          newGenre = 0

        else :

          newGenre = 1

        con = L2DatabaseFactory.getInstance().getConnection(None)

        offline = con.prepareStatement("UPDATE characters SET sex = ? WHERE charId = ?")

        offline.setInt(1, newGenre)

        offline.setInt(2, player.getObjectId())

        try :

          offline.executeUpdate()

          offline.close()

          con.close()

        except :

          try : con.close()

          except : pass

        player.store()

        player.broadcastUserInfo()

        player.decayMe()

        player.spawnMe(player.getX(), player.getY(), player.getZ())

  st.takeItems(Item, GenreCount)

        return "2.htm"

        st.playSound("ItemSound.quest_finish")

        st.exitQuest(1)

   

 

   

 

  def onTalk(self, npc, player) :

    htmltext = ""

    st = player.getQuestState(qn)

    if not st :

      st = self.newQuestState(player)

    htmltext = "1.htm"

    st.playSound("ItemSound.quest_accept")

    return htmltext

 

QUEST = Quest(8700,qn,"custom")

 

QUEST.addStartNpc(NPC)

 

QUEST.addTalkId(NPC)

 

exo ct 1,5 mipos prepi na kano kapia alagi giati den doyleboyn mexri edo mia xara  [ Hello, im Sure i wana Change ] molis patiso afto moy lei [ you are either not on a quest thet involver this npc, or you don't meet this npc's minimum quest requirements mipos mporis na boi8isis pliz

Posted

import sys

from com.l2jfree                                  import Config

from com.l2jfree                                  import L2DatabaseFactory

from com.l2jfree.gameserver.datatables            import CharTemplateTable

from com.l2jfree.gameserver.communitybbs.Manager  import RegionBBSManager

from com.l2jfree.gameserver.model                 import L2World

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

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

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

from com.l2jfree.gameserver.network.serverpackets import EtcStatusUpdate

from com.l2jfree.gameserver.network.serverpackets import PledgeShowInfoUpdate

from com.l2jfree.tools.random                     import Rnd

 

qn = "8700_Services"

 

NPC = 8700

 

 

# Items

Item = 3481

GenreCount = 10

 

print "INFO Loaded: 8700_Services"

 

 

def AutoChat(npc, text) :

   chars = npc.getKnownList().getKnownPlayers().values().toArray()

   if chars != None :

     for pc in chars :

       sm = NpcSay(npc.getObjectId(), 0, npc.getNpcId(), text)

       pc.sendPacket(sm)

 

class Quest (JQuest) :

 

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

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

 

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

    st = player.getQuestState(qn)

    htmltext = event

 

    if event == "changeGenre" :

      if st.getQuestItemsCount(Item) < GenreCount :

        htmltext = "cant.htm"

      elif player.isCursedWeaponEquipped() :

        AutoChat(npc, player.getName()+" you can't change your genre when you are equipped with a Cursed Weapon.")

        htmltext = "cant.htm"

      else :

        if player.getAppearance().getSex() == 1 :

          newGenre = 0

        else :

          newGenre = 1

        con = L2DatabaseFactory.getInstance().getConnection(None)

        offline = con.prepareStatement("UPDATE characters SET sex = ? WHERE charId = ?")

        offline.setInt(1, newGenre)

        offline.setInt(2, player.getObjectId())

        try :

          offline.executeUpdate()

          offline.close()

          con.close()

        except :

          try : con.close()

          except : pass

        player.store()

        player.broadcastUserInfo()

        player.decayMe()

        player.spawnMe(player.getX(), player.getY(), player.getZ())

   st.takeItems(Item, GenreCount)

        return "2.htm"

        st.playSound("ItemSound.quest_finish")

        st.exitQuest(1)

   

 

    

  

  def onTalk(self, npc, player) :

    htmltext = ""

    st = player.getQuestState(qn)

    if not st :

      st = self.newQuestState(player)

    htmltext = "1.htm"

    st.playSound("ItemSound.quest_accept")

    return htmltext

 

QUEST = Quest(8700,qn,"custom")

 

QUEST.addStartNpc(NPC)

 

QUEST.addTalkId(NPC)

 

exo ct 1,5 mipos prepi na kano kapia alagi giati den doyleboyn mexri edo mia xara  [ Hello, im Sure i wana Change ] molis patiso afto moy lei [ you are either not on a quest thet involver this npc, or you don't meet this npc's minimum quest requirements mipos mporis na boi8isis pliz

mia erothsh mono ayto ti einai ???? an einai error apo kapio program tote se lathos topic to ebales gt ego dn exo bali kapio program edo ala mia lista apo programs
Posted

import sys

from com.l2jfree                                  import Config

from com.l2jfree                                  import L2DatabaseFactory

from com.l2jfree.gameserver.datatables            import CharTemplateTable

from com.l2jfree.gameserver.communitybbs.Manager  import RegionBBSManager

from com.l2jfree.gameserver.model                import L2World

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

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

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

from com.l2jfree.gameserver.network.serverpackets import EtcStatusUpdate

from com.l2jfree.gameserver.network.serverpackets import PledgeShowInfoUpdate

from com.l2jfree.tools.random                    import Rnd

 

qn = "8700_Services"

 

NPC = 8700

 

 

# Items

Item = 3481

GenreCount = 10

 

print "INFO Loaded: 8700_Services"

 

 

def AutoChat(npc, text) :

  chars = npc.getKnownList().getKnownPlayers().values().toArray()

  if chars != None :

    for pc in chars :

      sm = NpcSay(npc.getObjectId(), 0, npc.getNpcId(), text)

      pc.sendPacket(sm)

 

class Quest (JQuest) :

 

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

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

 

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

    st = player.getQuestState(qn)

    htmltext = event

 

    if event == "changeGenre" :

      if st.getQuestItemsCount(Item) < GenreCount :

        htmltext = "cant.htm"

      elif player.isCursedWeaponEquipped() :

        AutoChat(npc, player.getName()+" you can't change your genre when you are equipped with a Cursed Weapon.")

        htmltext = "cant.htm"

      else :

        if player.getAppearance().getSex() == 1 :

          newGenre = 0

        else :

          newGenre = 1

        con = L2DatabaseFactory.getInstance().getConnection(None)

        offline = con.prepareStatement("UPDATE characters SET sex = ? WHERE charId = ?")

        offline.setInt(1, newGenre)

        offline.setInt(2, player.getObjectId())

        try :

          offline.executeUpdate()

          offline.close()

          con.close()

        except :

          try : con.close()

          except : pass

        player.store()

        player.broadcastUserInfo()

        player.decayMe()

        player.spawnMe(player.getX(), player.getY(), player.getZ())

  st.takeItems(Item, GenreCount)

        return "2.htm"

        st.playSound("ItemSound.quest_finish")

        st.exitQuest(1)

   

 

   

 

  def onTalk(self, npc, player) :

    htmltext = ""

    st = player.getQuestState(qn)

    if not st :

      st = self.newQuestState(player)

    htmltext = "1.htm"

    st.playSound("ItemSound.quest_accept")

    return htmltext

 

QUEST = Quest(8700,qn,"custom")

 

QUEST.addStartNpc(NPC)

 

QUEST.addTalkId(NPC)

 

exo ct 1,5 mipos prepi na kano kapia alagi giati den doyleboyn mexri edo mia xara  [ Hello, im Sure i wana Change ] molis patiso afto moy lei [ you are either not on a quest thet involver this npc, or you don't meet this npc's minimum quest requirements mipos mporis na boi8isis pliz

 

auto einai mono spam!

 

to exw ksana dei pou to exei kanei post o idios se allo topic

 

 

1~ Warning Save!

Posted
MeGiStOs" post="290751" timestamp="1229772699"]

etc megale brv s . alla re c ti ta kanete hide?? twra prepei na kolovaraw sta posts.. tespa gj pados!

o logos pou einai hide einai prokeimenou na mn ta blepoun merikoi admin p dn einai DONATORS STO FORUM kai na mn ta bgazoun apo ton server tous kai an mporis mila kalitera ayta apo mena
Posted

kala man eisai alan1k pws ekatses ka ta ekanes ola afta dld ti na pw

epsaxnes kai postares xara sto kouragio sou thx poli ta epsaxna merika sinexise etsi

ala gt -4 karma re pedia doste tou 1 karma tou nathropou gia tin doulia t

Posted

ty gia to karma onepiece skeftomai na kano kai alo ena kalo topic tora exo kati sto nou mou tha einai pragmatika teleio :P

  • 3 weeks later...
  • 1 month later...
Guest
This topic is now closed to further replies.

×
×
  • Create New...