Jump to content
  • 0

[Help]aCis Buffer


Question

15 answers to this question

Recommended Posts

  • 0
Posted

import sys

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from java.util import Iterator

from net.sf.l2j.gameserver.datatables import SkillTable

from net.sf.l2j       import L2DatabaseFactory

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

 

 

kai kato kato kanto etsi

 

QUEST      = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

 

for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

  • 0
Posted

import sys

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from java.util import Iterator

from net.sf.l2j.gameserver.datatables import SkillTable

from net.sf.l2j       import L2DatabaseFactory

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

 

 

kai kato kato kanto etsi

 

QUEST      = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

 

for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

 

Παλι μου βγαζει you don't meet the criteria... στα scripts.cfg εχω βαλει custom/9999_NPCBuffer/__init__.py

Επεισης μου βγαζει ενα txt που λει αυτο :

Error on: C:\Users\Nikos\Desktop\L2 Τest\gameserver\data\scripts\custom\9999_NPCBuffer\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

  File "__init__.py", line 512, in ?

TypeError: net.sf.l2j.gameserver.model.quest.State(): expected 0 args; got 2

  • 0
Posted

sto 512 line einai to problima

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

otan balis ayta edw na sbisis ayta poy exei kato h buffer

an den soy perniete pali kantin share edw na stin ftiaksw

  • 0
Posted

sto 512 line einai to problima

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

otan balis ayta edw na sbisis ayta poy exei kato h buffer

an den soy perniete pali kantin share edw na stin ftiaksw

 

to exw kanei auto , oriste to link : http://www.mediafire.com/?oq6c31ruez0qsv1

  • 0
Posted

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j                import L2DatabaseFactory
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 = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

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


def onEvent(self,event,st):
	htmltext = event
	count=st.getQuestItemsCount(ADENA_ID)
	if count < 1000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Acument
		if event == "2":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Agility
		if event == "3":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

                        #Bless Shield
		if event == "5":
			st.takeItems
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Soul
	        if event == "7":
			st.takeItems
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)


		#Dance of Concentration
		if event == "31":
			st.takeItems
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Water
		if event == "62":
			st.takeItems
			SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Wind
		if event == "63":
			st.takeItems
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)


		#Greater Might
		if event == "64":
			st.takeItems
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		#MP-HP
		if event == "71":
			st.takeItems
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
                                st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
                                st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
			return "1.htm"				
			st.setState(COMPLETED)


        		#Chant of Magnus
		if event == "74":
			st.takeItems
			SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)


       			#Wild Magic
		if event == "75":
			st.takeItems
			SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)
       			
		#Fighter Buffs
		if event == "76":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
                                SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())							
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())									
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)

		#Mage Buffs
		if event == "77":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)


		if htmltext != event:
			st.setState(COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

sbise oti exei mesa to script soy kai kane c/p ayta

  • 0
Posted

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j                import L2DatabaseFactory
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 = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

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


def onEvent(self,event,st):
	htmltext = event
	count=st.getQuestItemsCount(ADENA_ID)
	if count < 1000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Acument
		if event == "2":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Agility
		if event == "3":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

                        #Bless Shield
		if event == "5":
			st.takeItems
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Soul
	        if event == "7":
			st.takeItems
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)


		#Dance of Concentration
		if event == "31":
			st.takeItems
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Water
		if event == "62":
			st.takeItems
			SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Wind
		if event == "63":
			st.takeItems
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)


		#Greater Might
		if event == "64":
			st.takeItems
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		#MP-HP
		if event == "71":
			st.takeItems
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
                                st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
                                st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
			return "1.htm"				
			st.setState(COMPLETED)


        		#Chant of Magnus
		if event == "74":
			st.takeItems
			SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)


       			#Wild Magic
		if event == "75":
			st.takeItems
			SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)
       			
		#Fighter Buffs
		if event == "76":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
                                SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())							
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())									
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)

		#Mage Buffs
		if event == "77":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)


		if htmltext != event:
			st.setState(COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

sbise oti exei mesa to script soy kai kane c/p ayta

 

b7fh3k.jpg

 

34fb8th.jpg

 

Επισης μεσα στο παιχνιδι μου λει " Script Error ".

  • 0
Posted

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j                import L2DatabaseFactory
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 = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

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


def onEvent(self,event,st):
	htmltext = event
	count=st.getQuestItemsCount(ADENA_ID)
	if count < 1000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Acument
		if event == "2":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Agility
		if event == "3":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

                        #Bless Shield
		if event == "5":
			st.takeItems
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Soul
	        if event == "7":
			st.takeItems
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)


		#Dance of Concentration
		if event == "31":
			st.takeItems
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Water
		if event == "62":
			st.takeItems
			SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Wind
		if event == "63":
			st.takeItems
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)


		#Greater Might
		if event == "64":
			st.takeItems
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		#MP-HP
		if event == "71":
			st.takeItems
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
                                st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
                                st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
			return "1.htm"				
			st.setState(COMPLETED)


        		#Chant of Magnus
		if event == "74":
			st.takeItems
			SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)


       			#Wild Magic
		if event == "75":
			st.takeItems
			SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)
       			
		#Fighter Buffs
		if event == "76":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
                                SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())							
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())									
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)

		#Mage Buffs
		if event == "77":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)


		if htmltext != event:
			st.setState(COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(State.STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

itan etsi st.setState(STARTED)    eno eprepe na einai st.setState(State.STARTED)

  • 0
Posted

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j                import L2DatabaseFactory
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 = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

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


def onEvent(self,event,st):
	htmltext = event
	count=st.getQuestItemsCount(ADENA_ID)
	if count < 1000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Acument
		if event == "2":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Agility
		if event == "3":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

                        #Bless Shield
		if event == "5":
			st.takeItems
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Soul
	        if event == "7":
			st.takeItems
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)


		#Dance of Concentration
		if event == "31":
			st.takeItems
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Water
		if event == "62":
			st.takeItems
			SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Wind
		if event == "63":
			st.takeItems
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)


		#Greater Might
		if event == "64":
			st.takeItems
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		#MP-HP
		if event == "71":
			st.takeItems
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
                                st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
                                st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
			return "1.htm"				
			st.setState(COMPLETED)


        		#Chant of Magnus
		if event == "74":
			st.takeItems
			SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)


       			#Wild Magic
		if event == "75":
			st.takeItems
			SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)
       			
		#Fighter Buffs
		if event == "76":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
                                SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())							
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())									
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)

		#Mage Buffs
		if event == "77":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)


		if htmltext != event:
			st.setState(COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(State.STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

itan etsi st.setState(STARTED)    eno eprepe na einai st.setState(State.STARTED)

 

Ωραια τωρα τι κανω...

  • 0
Posted

miso na tin test den eprepe na bgazi error

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j                import L2DatabaseFactory
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 = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

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


def onEvent(self,event,st):
	htmltext = event
	count=st.getQuestItemsCount(ADENA_ID)
	if count < 1000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Acument
		if event == "2":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Agility
		if event == "3":
			st.takeItems
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

                        #Bless Shield
		if event == "5":
			st.takeItems
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Blessed Soul
	        if event == "7":
			st.takeItems
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			SkillTable.getInstance().getInfo(4354,4).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)


		#Dance of Concentration
		if event == "31":
			st.takeItems
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "3.htm"
			st.setState(State.COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Water
		if event == "62":
			st.takeItems
			SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)
		#Song of Wind
		if event == "63":
			st.takeItems
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "4.htm"
			st.setState(State.COMPLETED)


		#Greater Might
		if event == "64":
			st.takeItems
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		#MP-HP
		if event == "71":
			st.takeItems
			st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
                                st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
                                st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
			return "1.htm"				
			st.setState(COMPLETED)


        		#Chant of Magnus
		if event == "74":
			st.takeItems
			SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "5.htm"
			st.setState(State.COMPLETED)


       			#Wild Magic
		if event == "75":
			st.takeItems
			SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())				
			return "2.htm"
			st.setState(State.COMPLETED)
       			
		#Fighter Buffs
		if event == "76":
			st.takeItems
			SkillTable.getInstance().getInfo(4360,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4359,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4358,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4357,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
                                SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())							
			SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())									
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)

		#Mage Buffs
		if event == "77":
			st.takeItems
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4351,6).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4355,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4353,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4356,3).getEffects(st.getPlayer(),st.getPlayer())		
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4352,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())	
			SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "6.htm"
			st.setState(State.COMPLETED)


		if htmltext != event:
			st.setState(COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(State.STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

itan etsi st.setState(STARTED)    eno eprepe na einai st.setState(State.STARTED)

Μην ξανακάνεις πολλαπλά posts, δεν είναι η πρώτη φορά που το κάνεις, πάρτο σαν προειδοποίηση.

@ontopic: Βαλάντη έχεις δίκιο τελικά, μπορούν να τρέξουν python αρχεία στο acis.

  • 0
Posted

Μην ξανακάνεις πολλαπλά posts, δεν είναι η πρώτη φορά που το κάνεις, πάρτο σαν προειδοποίηση.

@ontopic: Βαλάντη έχεις δίκιο τελικά, μπορούν να τρέξουν python αρχεία στο acis.

min les koyla gia dikse moy alli mia fora na exw kani diplo pos

( mperdeytika an thes sbistw ) den eimai 13 xrono na milas etsi

 

 

pare ton 2o code c/p kai baltos sto __init__.py soy kai einai etimi

 

 

 

Edit : an den eimaste sigoyri gia kati kalo einai na min spamaroyme kai dinoyme lathos kathodigisi :) entelos filika to leei sta rules

Guest
This topic is now closed to further replies.


×
×
  • Create New...