def onKill (self,npc,player,isPet): st = player.getQuestState("baylor") npcId = npc.getNpcId() if npcId == BAYLOR : BaylorManager.getInstance().setCubeSpawn() if not st: return st.exitQuest(1) return
def onKill(self, npc, player, isPet): st = player.getQuestState("baylor") npcId = npc.getNpcId() if npcId == BAYLOR: BaylorManager.getInstance().setCubeSpawn() if not st: return st.exitQuest(1) return
def onAdvEvent(self,event,npc,player): htmltext = event instanceId = player.getInstanceId() if event == "32280-1": item1 = player.getInventory().getItemByItemId(BLUE_CRYSTAL) item2 = player.getInventory().getItemByItemId(RED_CRYSTAL) item3 = player.getInventory().getItemByItemId(CLEAR_CRYSTAL) if not item1 or not item2 or not item3: htmltext = "32280-3" else: rndCrystal = Rnd.get(len(CRY)) player.destroyItemByItemId("Quest", CRY[rndCrystal], 1, player, True) dropItem(npc,PRISON_KEY,1) BAYLOR_STATE = BaylorManager.getInstance().canIntoBaylorLair(player) if BAYLOR_STATE != 0 and BAYLOR_STATE != 4: htmltext = "32280-4" return htmltext+".htm" self.addSpawn(BAYLOR, 153569, 142075, -12732, 37421, False, 0, False, instanceId) elif event == "32280-2": tele = PyObject() tele.x = 149361 tele.y = 172327 tele.z = -945 exitInstance(player,tele) return return htmltext+".htm"
def onTalk (self,npc,player): npcId = npc.getNpcId() if npcId == ORACLE_GUIDE: BAYLOR_STATE = BaylorManager.getInstance().canIntoBaylorLair(player) if BAYLOR_STATE == 0 or BAYLOR_STATE == 4: htmltext = "meetingOk.htm" else: htmltext = "teleportOut.htm" return htmltext
def onTalk (self,npc,player): st = player.getQuestState("baylor") if not st : return "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>" npcId = npc.getNpcId() if npcId == STATUE : ENTRY_SATAT = BaylorManager.getInstance().canIntoBaylorLair(player) if ENTRY_SATAT == 1 or ENTRY_SATAT == 2 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>Another adventurers have already fought against the baylor. Do not obstruct them.</body></html>" elif ENTRY_SATAT == 3 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>The baylor is very powerful now. It is not possible to enter the inside.</body></html>" elif ENTRY_SATAT == 4 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>You seal the baylor alone? You should not do so! Bring the companion.</body></html>" elif ENTRY_SATAT == 0 : BaylorManager.getInstance().setBaylorSpawnTask(CRYSTALINE) BaylorManager.getInstance().setBaylorSpawnTask(BAYLOR) BaylorManager.getInstance().entryToBaylorLair(player) return "<html><body>Shilen's Stone Statue:<br>Please seal the baylor by your ability.</body></html>"
def onTalk (self,npc,player): st = player.getQuestState("baylor") if not st : return "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>" npcId = npc.getNpcId() if npcId == STATUE : ENTRY_SATAT = BaylorManager.getInstance().canIntoBaylorLair(player) if ENTRY_SATAT == 1 or ENTRY_SATAT == 2 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>Another adventurers have already fought against the baylor. Do not obstruct them.</body></html>" elif ENTRY_SATAT == 3 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>The baylor is very powerful now. It is not possible to enter the inside.</body></html>" elif ENTRY_SATAT == 4 : st.exitQuest(1) return "<html><body>Shilen's Stone Statue:<br>You seal the baylor alone? You should not do so! Bring the companion.</body></html>" elif ENTRY_SATAT == 0 : BaylorManager.getInstance().setBaylorSpawnTask(CRYSTALINE) BaylorManager.getInstance().setBaylorSpawnTask(BAYLOR) BaylorManager.getInstance().entryToBaylorLair(player) return "<html><body>Shilen's Stone Statue:<br>Please seal the baylor by your ability.</body></html>"