pajington Posted July 25, 2011 Posted July 25, 2011 hi, i have written one missing quest but idk how to import it to datapack core in eclipse ..... :/ or how can i add it to server ? thanks Quote
0 Tryskell Posted July 26, 2011 Posted July 26, 2011 You put q folder in data/scripts/quests, then add one line in scripts.cfg. If you were talking of not reworked IL questing stuff, too bad, next time you will say what you use, like that ppl can help you without making suppositions by their own. Quote
0 pajington Posted July 26, 2011 Author Posted July 26, 2011 i got a problem with this code :/ import sys from com.l2jserver.gameserver.datatables import SkillTable from com.l2jserver.gameserver.instancemanager import InstanceManager from com.l2jserver.gameserver.model.actor.instance import L2PcInstance from com.l2jserver.gameserver.model.actor.instance import L2DoorInstance 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 ExStartScenePlayer qn = "195_SevenSignSecretRitualOfThePriests" # NPCs ClaudiaAthebalt = 31001 John = 32576 Raymond = 30289 LightOfDawn = 32575 Device = 32578 IasonHeine = 30969 PasswordEntryDevice = 32577 Shkaf = 32580 Black = 32579 # ITEMS EmperorShunaimanContract = 13823 IdentityCard = 13822 ScrollofEscape = 7128 # Transformation's skills GuardofDawn = 6204 class Quest (JQuest): def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.questItemIds = [identityCard, EmperorShunaimanContract] SCROLL = 0 def onAdvEvent (self,event,npc,player): htmltext = event st = player.getQuestState(qn) if not st: return if event == "31001-02.htm": st.setState(State.STARTED) st.playSound("ItemSound.quest_accept") if event == "31001-05.htm": st.set("cond","1") st.playSound("ItemSound.quest_middle") elif event == "32576-02.htm": st.giveItems(IdentityCard,1) st.set("cond","2") st.playSound("ItemSound.quest_middle") elif event == "30289-04.htm": player.stopAllEffects() SkillTable.getInstance().getInfo(6204,1).getEffects(player,player) st.set("cond","3") elif event == "30289-07.htm": player.stopAllEffects() elif event == "30969-03.htm": st.addExpAndSp(52518015, 5817677) st.unset("cond") st.exitQuest(False) st.playSound("ItemSound.quest_finish") elif event == "quit": instanceId = player.getInstanceId() instance = InstanceManager.getInstance().getInstance(instanceId) player.setInstanceId(0) player.teleToLocation(-12491,122331,-2984) htmltext = "" return htmltext def onTalk (self,npc,player): htmltext = Quest.getNoQuestMsg(player) st = player.getQuestState(qn) if not st: return htmltext npcId = npc.getNpcId() id = st.getState() cond = st.getInt("cond") if id == State.COMPLETED: htmltext = Quest.getAlreadyCompletedMsg(player) elif id == State.CREATED : if npcId == ClaudiaAthebalt and cond == 0: first = player.getQuestState("194_SevenSignContractOfMammon") if first: if first.getState() == State.COMPLETED and player.getLevel() >= 79 : htmltext = "31001-01.htm" else: htmltext = "31001-0a.htm" st.exitQuest(1) elif id == State.STARTED: if npcId == ClaudiaAthebalt: if cond == 1: htmltext = "31001-06.htm" elif npcId == John: if cond == 1: htmltext = "32576-01.htm" elif cond == 2: htmltext = "32576-03.htm" elif npcId == Raymond: if cond == 2: htmltext = "30289-01.htm" elif cond == 3: htmltext = "30289-06.htm" elif cond == 4: if SCROLL == 0: if st.getQuestItemsCount(EmperorShunaimanContract) == 1 and st.getQuestItemsCount(ScrollofEscape) == 0 : htmltext = "30289-08.htm" player.stopAllEffects() st.giveItems(ScrollofEscape,1) st.playSound("ItemSound.quest_middle") SCROLL = 1 else : player.stopAllEffects() htmltext = "30289-08.htm" else : player.stopAllEffects() htmltext = "30289-08.htm" elif npcId == LightOfDawn: if cond == 3 and st.getQuestItemsCount(IdentityCard) == 1: htmltext = "32575-03.htm" else : htmltext = "32575-01.htm" elif npcId == Device: if player.getFirstEffect(GuardofDawn) != None: htmltext = "32578-03.htm" elif player.getFirstEffect(GuardofDawn) == None: htmltext = "32578-02.htm" elif npcId == PasswordEntryDevice: if player.getFirstEffect(GuardofDawn) != None: htmltext = "32577-01.htm" elif player.getFirstEffect(GuardofDawn) == None: htmltext = "32577-03.htm" elif npcId == Shkaf and st.getQuestItemsCount(EmperorShunaimanContract) == 0: htmltext = "32580-01.htm" st.giveItems(EmperorShunaimanContract,1) st.set("cond","4") elif npcId == Black and st.getQuestItemsCount(EmperorShunaimanContract) == 1: htmltext = "32579-01.htm" elif npcId == IasonHeine and st.getQuestItemsCount(EmperorShunaimanContract) == 1: htmltext = "30969-01.htm" return htmltext QUEST = Quest(195,qn,"Seven Sign Secret Ritual Of The Priests") QUEST.addStartNpc(ClaudiaAthebalt) QUEST.addTalkId(ClaudiaAthebalt) QUEST.addTalkId(John) QUEST.addTalkId(Raymond) QUEST.addTalkId(LightOfDawn) QUEST.addTalkId(Device) QUEST.addTalkId(PasswordEntryDevice) QUEST.addTalkId(Shkaf) QUEST.addTalkId(Black) QUEST.addTalkId(IasonHeine) __init__.py.error.log wrote this "Error on: gameserver\data\scripts\quests\195_SevenSignSecretRitualOfThePriests\__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): (no code object) at line 0 SyntaxError: ('invalid syntax', ('__init__.py', 95, 25, ' if npcId == ClaudiaAthebalt:')) Thanks Quote
0 adenaman Posted July 26, 2011 Posted July 26, 2011 i dont know too much about py, but i think there are spaces that shouldnt be there elif id == State.STARTED: if npcId == ClaudiaAthebalt: try to change the elif to the same level that the other elifs (CREATED, COMPLETED, ...) Quote
0 pajington Posted July 26, 2011 Author Posted July 26, 2011 i have already tried it :/....but still doesnt work :( Quote
0 Tryskell Posted July 26, 2011 Posted July 26, 2011 You do syntax mistakes, see the error. Just open an existing python stuff and see how it's written. I see you use instanceid so you're postIL stuff and should have java qEngine, why still using Python when you can have full java support ? The debug and syntax will be easier to understand than "you got error at line 0". Quote
0 pajington Posted July 26, 2011 Author Posted July 26, 2011 thanks for replies; i have remade that and it works but get stucked at one part where npc should transform me into GuardsOfTheDawn but he dont :/ ...here is that part of code; btw whole effects are stopped but he dont transform me :( .... elif event == "30289-04.htm": player.stopAllEffects() SkillTable.getInstance().getInfo(6204,1).getEffects(player,player) st.set("cond","3") Quote
Question
pajington
hi, i have written one missing quest but idk how to import it to datapack core in eclipse ..... :/ or how can i add it to server ?
thanks
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.