# Made by Mr. Have fun! - Version 0.3 by DrLecter
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
qn = "q250_exp_cruma"
DUSHA = 9427
ADENA = 12262
ADENA1 = 57
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = event
if event == "2.htm" :
st.set("cond","1")
st.setState(STARTED)
#1 lvl 100 dush
elif event == "5.htm" :
st.takeItems(DUSHA,25)
st.set("cond","2")
elif event == "8.htm" :
st.takeItems(DUSHA,50)
st.set("cond","3")
elif event == "11.htm" :
st.takeItems(DUSHA,100)
st.set("cond","4")
elif event == "14.htm" :
st.takeItems(DUSHA,150)
st.set("cond","5")
elif event == "17.htm" :
st.takeItems(DUSHA,250)
st.set("cond","6")
elif event == "20.htm" :
st.takeItems(DUSHA,500)
st.set("cond","7")
elif event == "24.htm" :
st.takeItems(DUSHA,1000)
st.set("cond","8")
return htmltext
def onTalk (self,npc,player):
htmltext = "<html><body>This quest has already been completed.</body></html>"
st = player.getQuestState(qn)
if not st : return htmltext
npcId = npc.getNpcId()
id = st.getState()
if id == CREATED :
st.set("cond","0")
#если кв не взят, дать квест
if st.getInt("cond")==0 :
htmltext = "1.htm"
#если взял кв, нет 100 душ
if st.getInt("cond")==1 and st.getQuestItemsCount(DUSHA) < 25:
htmltext = "3.htm"
#если взял кв, есть 100+ душ
if st.getInt("cond")==1 and st.getQuestItemsCount(DUSHA) >= 25:
htmltext = "4.htm"
#гильда 1 лвл, нет душ
if st.getInt("cond")==2 and st.getQuestItemsCount(DUSHA) < 50:
htmltext = "6.htm"
#гильда 1 лвл, есть души
if st.getInt("cond")==2 and st.getQuestItemsCount(DUSHA) >= 50:
htmltext = "7.htm"
#гильда 2 лвл, нет души
if st.getInt("cond")==3 and st.getQuestItemsCount(DUSHA) < 100:
htmltext = "9.htm"
#гильда 2 лвл, есть души
if st.getInt("cond")==3 and st.getQuestItemsCount(DUSHA) >= 100:
htmltext = "10.htm"
#гильда 3 лвл, нет души
if st.getInt("cond")==4 and st.getQuestItemsCount(DUSHA) >= 150:
htmltext = "12.htm"
#гильда 3 лвл, есть души
if st.getInt("cond")==4 and st.getQuestItemsCount(DUSHA) >= 150:
htmltext = "13.htm"
#гильда 4 лвл, нет души
if st.getInt("cond")==5 and st.getQuestItemsCount(DUSHA) >= 250:
htmltext = "15.htm"
#гильда 4 лвл, есть души
if st.getInt("cond")==5 and st.getQuestItemsCount(DUSHA) >= 250:
htmltext = "16.htm"
#гильда 5 лвл, нет души
if st.getInt("cond")==6 and st.getQuestItemsCount(DUSHA) >= 500:
htmltext = "18.htm"
#гильда 5 лвл, есть души
if st.getInt("cond")==6 and st.getQuestItemsCount(DUSHA) >= 500:
htmltext = "19.htm"
#гильда 6 лвл, нет души
if st.getInt("cond")==7 and st.getQuestItemsCount(DUSHA) < 1000:
htmltext = "22.htm"
#гильда 6 лвл, есть души
if st.getInt("cond")==7 and st.getQuestItemsCount(DUSHA) >= 1000:
htmltext = "23.htm"
if st.getInt("cond")==8:
htmltext = "25.htm"
return htmltext
def onKill(self,npc,player,isPet):
partyMember = self.getRandomPartyMember(player,"1")
if not partyMember: return
st = partyMember.getQuestState(qn)
npcId = npc.getNpcId()
chance=17
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 9712);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 13267);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 18447);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 18447);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 13267);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 13267);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 9123);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 9123);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 6683);
if st.getInt("cond") == 2 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 6683);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 24280);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 33167);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 46117);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 46117);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 33167);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 33167);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 22807);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 22807);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 16707);
if st.getInt("cond") == 3 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 16707);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 48560);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 66334);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 66334);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 66334);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 92234);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 92234);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 45614);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 45614);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 33414);
if st.getInt("cond") == 4 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 33414);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 72840);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 99501);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 99501);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 99501);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 138351);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 138351);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 68421);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 68421);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 50121);
if st.getInt("cond") == 5 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 50121);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 97123);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 132672);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 132672);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 132672);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 184473);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 184473);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 91230);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 91230);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 66830);
if st.getInt("cond") == 6 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 66830);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 145684);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 199008);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 199008);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 199008);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 276709);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 276709);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 136845);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 136845);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 100245);
if st.getInt("cond") == 7 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 100245);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39100]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 291368);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39082]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 398016);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39085]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 398016);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39086]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 398016);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39083]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 553418);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39084]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 553418);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39087]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 273690);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39088]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 273690);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39101]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 200490);
if st.getInt("cond") == 8 and player.getLevel() == 80 and npcId in [39112]:
if st.getRandom(10)<chance :
st.addExpAndSp(0, 200490);
return
QUEST = Quest(250,qn,"exp cruma")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(50004)
QUEST.addTalkId(50004)
QUEST.addKillId(39100)
QUEST.addKillId(39082)
QUEST.addKillId(39083)
QUEST.addKillId(39084)
QUEST.addKillId(39085)
QUEST.addKillId(39086)
QUEST.addKillId(39087)
QUEST.addKillId(39088)
QUEST.addKillId(39101)
QUEST.addKillId(39112)