Jump to content
  • 0

[Help]Buffer L2Jfrozen!


CHAPPiE

Question

8 answers to this question

Recommended Posts

  • 0

des ta html ta evales swsta?
..\L2j Server\gameserver\data\html\default

egw enan buffer pou eixa katevasei kai esura apla ta data tou mesa ston server den douleue giati itan gramenos lathos o fakelos default kai ta evale se lathos thesi
tsekare to

Edited by Pk_Lover
Link to comment
Share on other sites

  • 0

ftene ta import tis buffer ise sigouros pos ine import gia frozen alakseta se l2jfrozen mporis na to bris opos kan kai mena na psakso se dino mia lisi an ftei afto psakse ta impoer tis l2jfrozen na perasis stin java px custom 999_npc_bufer to san java arxio use notepad++

Edited by l22expert
Link to comment
Share on other sites

  • 0
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance
from java.util import Iterator
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.util.database import L2DatabaseFactory
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

qn = "9999_NPCBuffer"

NPC=[9999]
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 < 0  or st.getPlayer().getLevel() < 1 :
			htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or higher.</body></html>"
		else:
			st.takeItems(ADENA_ID,0)
			st.getPlayer().setTarget(st.getPlayer())
			
			#Wind Walk
			if event == "2":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Decrease Weight
			if event == "3":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1257,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Shield
			if event == "4":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Might
			if event == "5":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Mental Shield
			if event == "6":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless the Body
			if event == "7":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless the Soul
			if event == "8":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1048,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Magic Barrier
			if event == "9":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Concentration
			if event == "10":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Berserker Spirit
			if event == "11":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless Shield
			if event == "12":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1243,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Vampiric Rage
			if event == "13":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Acumen
			if event == "14":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Empower
			if event == "15":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Haste
			if event == "16":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Guidance
			if event == "17":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Focus
			if event == "18":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Death Whisper
			if event == "19":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

            #Agility
			if event == "20":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Clarity
			if event == "21":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Advanced Block
			if event == "22":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1304,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Kiss of Eva
			if event == "23":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1073,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Greater Shield
			if event == "24":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"
				st.setState(COMPLETED)	
                                               
            #Wild Magic
			if event == "25":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)

			#Regeneration
			if event == "26":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1044,3).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Holy Weapon
			if event == "27":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1043,1).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Mana Regeneration
			if event == "28":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1047,4).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Greather Might
			if event == "29":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Chant of battle
			if event == "30":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1007,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Shielding
			if event == "31":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1009,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Fire
			if event == "32":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1006,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Flame
			if event == "33":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1002,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Fury
			if event == "34":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1251,2).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Evasion
			if event == "35":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1252,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Rage
			if event == "36":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1253,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Revenge
			if event == "37":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1284,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Vampire
			if event == "38":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1310,4).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Eagle
			if event == "39":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1309,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Predator
			if event == "40":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1308,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Spirit
			if event == "41":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1362,1).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Victory
			if event == "42":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Chant of Magnus
			if event == "43":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#War Chant
			if event == "44":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1390,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Earth Chant
			if event == "45":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1391,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of life
			if event == "46":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1229,1).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Body Avatar
			if event == "47":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1311,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Profecy of Fire
			if event == "48":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Profecy of Wather
			if event == "49":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#profecy of Wind
			if event == "50":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Blessing of Queen
			if event == "51":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4699,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Blessing of Seraphim
			if event == "52":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4702,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Gifth Queen
			if event == "53":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4703,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Gifth Seraphim
			if event == "54":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4700,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Holy Resistance
			if event == "55":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Unholy Resistance
			if event == "56":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Aqua
			if event == "57":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Wind
			if event == "58":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Fire
			if event == "59":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1191,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Poison
			if event == "60":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1033,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Elemetal Protection
			if event == "61":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Arcane Protection
			if event == "62":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Divine Protection
			if event == "63":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Invigor
			if event == "64":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Shock
			if event == "65":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1259,4).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Gifth
			if event == "66":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1003,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Blessing
			if event == "67":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1005,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Glory
			if event == "68":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1008,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Tact
			if event == "69":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1260,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Wisdom
			if event == "70":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1004,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Protection
			if event == "71":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1250,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Rage
			if event == "72":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1261,2).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Vision
			if event == "73":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1249,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Haste
			if event == "74":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1282,2).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Eye
			if event == "75":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1364,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Soul
			if event == "76":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1365,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Emblem
			if event == "77":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1415,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Fist
			if event == "78":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1416,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Victory
			if event == "79":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1414,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Dance of Warrior
			if event == "80":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Inspiration
			if event == "81":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Mystic
			if event == "82":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Fire
			if event == "83":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Fury
			if event == "84":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Concentration
			if event == "85":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Light
			if event == "86":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Aqua Guard
			if event == "87":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Earth Guard
			if event == "88":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Vampire
			if event == "89":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Protection
			if event == "90":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Siren's Dance 
			if event == "91":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Shadow
			if event == "92":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(366,1).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Song of Earth
			if event == "93":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Life
			if event == "94":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Water
			if event == "95":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Warding
			if event == "96":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Wind
			if event == "97":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Hunter
			if event == "98":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Invocation
			if event == "99":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Vitality
			if event == "100":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Vengeance
			if event == "101":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Flame Guard
			if event == "102":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Storm Guard
			if event == "103":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Meditation
			if event == "104":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Champion
			if event == "105":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Renewal
			if event == "106":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Fighter Buffers
			if event == "107":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().stopAllEffects()
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(264,1).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(304,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"
				st.setState(COMPLETED)

			#Mage Buffers
			if event == "108":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().stopAllEffects()
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(264,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(269,1).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())
				SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"			
				st.setState(COMPLETED)

			if event == "109":
				st.takeItems(ADENA_ID,0)
				return "1.htm"		
				st.setState(COMPLETED)

			#Cancel
			if event == "110": 
				st.getPlayer().stopAllEffects()
				return "1.htm"
				st.setState(COMPLETED)

            #Noblesse Blessing
			if event == "111":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"
				st.setState(COMPLETED)	

            #Restore CP/HP/MP
			if event == "115":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
				st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
				st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
				return "1.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)
CREATED=State('Start',QUEST)
STARTED=State('Started',QUEST)
COMPLETED=State('Completed',QUEST)

QUEST.setInitialState(CREATED)

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

gia des nomizw pos einai swsta

Link to comment
Share on other sites

  • 0
import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance
from java.util import Iterator
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.util.database import L2DatabaseFactory
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

qn = "9999_NPCBuffer"

NPC=[9999]
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 < 0  or st.getPlayer().getLevel() < 1 :
			htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or higher.</body></html>"
		else:
			st.takeItems(ADENA_ID,0)
			st.getPlayer().setTarget(st.getPlayer())
			
			#Wind Walk
			if event == "2":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Decrease Weight
			if event == "3":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1257,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Shield
			if event == "4":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Might
			if event == "5":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Mental Shield
			if event == "6":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless the Body
			if event == "7":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless the Soul
			if event == "8":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1048,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Magic Barrier
			if event == "9":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Concentration
			if event == "10":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Berserker Spirit
			if event == "11":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Bless Shield
			if event == "12":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1243,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Vampiric Rage
			if event == "13":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Acumen
			if event == "14":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Empower
			if event == "15":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Haste
			if event == "16":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Guidance
			if event == "17":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Focus
			if event == "18":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Death Whisper
			if event == "19":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

            #Agility
			if event == "20":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Clarity
			if event == "21":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Advanced Block
			if event == "22":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1304,3).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Kiss of Eva
			if event == "23":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1073,2).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)	
                                                
            #Greater Shield
			if event == "24":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"
				st.setState(COMPLETED)	
                                               
            #Wild Magic
			if event == "25":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"
				st.setState(COMPLETED)

			#Regeneration
			if event == "26":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1044,3).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Holy Weapon
			if event == "27":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1043,1).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Mana Regeneration
			if event == "28":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1047,4).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Greather Might
			if event == "29":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Chant of battle
			if event == "30":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1007,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Shielding
			if event == "31":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1009,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Fire
			if event == "32":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1006,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Flame
			if event == "33":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1002,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Fury
			if event == "34":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1251,2).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Evasion
			if event == "35":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1252,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Rage
			if event == "36":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1253,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Revenge
			if event == "37":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1284,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Vampire
			if event == "38":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1310,4).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Eagle
			if event == "39":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1309,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Predator
			if event == "40":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1308,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Spirit
			if event == "41":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1362,1).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of Victory
			if event == "42":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Chant of Magnus
			if event == "43":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#War Chant
			if event == "44":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1390,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Earth Chant
			if event == "45":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1391,3).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Chant of life
			if event == "46":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1229,1).getEffects(st.getPlayer(),st.getPlayer())
				return "5.htm"		
				st.setState(COMPLETED)

			#Body Avatar
			if event == "47":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1311,6).getEffects(st.getPlayer(),st.getPlayer())
				return "2.htm"		
				st.setState(COMPLETED)

			#Profecy of Fire
			if event == "48":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Profecy of Wather
			if event == "49":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#profecy of Wind
			if event == "50":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Blessing of Queen
			if event == "51":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4699,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Blessing of Seraphim
			if event == "52":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4702,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Gifth Queen
			if event == "53":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4703,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Gifth Seraphim
			if event == "54":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(4700,13).getEffects(st.getPlayer(),st.getPlayer())
				return "7.htm"		
				st.setState(COMPLETED)

			#Holy Resistance
			if event == "55":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Unholy Resistance
			if event == "56":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Aqua
			if event == "57":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Wind
			if event == "58":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Fire
			if event == "59":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1191,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Poison
			if event == "60":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1033,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Elemetal Protection
			if event == "61":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Arcane Protection
			if event == "62":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Divine Protection
			if event == "63":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Invigor
			if event == "64":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Resist Shock
			if event == "65":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1259,4).getEffects(st.getPlayer(),st.getPlayer())
				return "6.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Gifth
			if event == "66":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1003,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Blessing
			if event == "67":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1005,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Glory
			if event == "68":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1008,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Tact
			if event == "69":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1260,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Wisdom
			if event == "70":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1004,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Protection
			if event == "71":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1250,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Rage
			if event == "72":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1261,2).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Vision
			if event == "73":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1249,3).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Haste
			if event == "74":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1282,2).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Eye
			if event == "75":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1364,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Soul
			if event == "76":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1365,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Emblem
			if event == "77":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1415,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Fist
			if event == "78":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1416,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Pa'agrio Victory
			if event == "79":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1414,1).getEffects(st.getPlayer(),st.getPlayer())
				return "10.htm"		
				st.setState(COMPLETED)

			#Dance of Warrior
			if event == "80":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Inspiration
			if event == "81":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Mystic
			if event == "82":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Fire
			if event == "83":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Fury
			if event == "84":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Concentration
			if event == "85":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Light
			if event == "86":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Aqua Guard
			if event == "87":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Earth Guard
			if event == "88":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Vampire
			if event == "89":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Protection
			if event == "90":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Siren's Dance 
			if event == "91":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
				return "4.htm"		
				st.setState(COMPLETED)

			#Dance of Shadow
			if event == "92":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(366,1).getEffects(st.getPlayer(),st.getPlayer())
				return "8.htm"		
				st.setState(COMPLETED)

			#Song of Earth
			if event == "93":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Life
			if event == "94":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Water
			if event == "95":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Warding
			if event == "96":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Wind
			if event == "97":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Hunter
			if event == "98":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Invocation
			if event == "99":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Vitality
			if event == "100":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Vengeance
			if event == "101":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Flame Guard
			if event == "102":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Storm Guard
			if event == "103":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Meditation
			if event == "104":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Champion
			if event == "105":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Song of Renewal
			if event == "106":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
				return "3.htm"		
				st.setState(COMPLETED)

			#Fighter Buffers
			if event == "107":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().stopAllEffects()
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(264,1).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(304,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"
				st.setState(COMPLETED)

			#Mage Buffers
			if event == "108":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().stopAllEffects()
				SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1303,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(264,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(269,1).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())
				SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"			
				st.setState(COMPLETED)

			if event == "109":
				st.takeItems(ADENA_ID,0)
				return "1.htm"		
				st.setState(COMPLETED)

			#Cancel
			if event == "110": 
				st.getPlayer().stopAllEffects()
				return "1.htm"
				st.setState(COMPLETED)

            #Noblesse Blessing
			if event == "111":
				st.takeItems(ADENA_ID,0)
				SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
				return "1.htm"
				st.setState(COMPLETED)	

            #Restore CP/HP/MP
			if event == "115":
				st.takeItems(ADENA_ID,0)
				st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
				st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())
				st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())
				return "1.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)
CREATED=State('Start',QUEST)
STARTED=State('Started',QUEST)
COMPLETED=State('Completed',QUEST)

QUEST.setInitialState(CREATED)

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

gia des nomizw pos einai swsta

 

to dokimasa auto den fteei

 

sosta einai ta import  tou frozen oposta ida an thimame kl gia dokimase an den mporis na make clan ftei i buffer alaksetis

eisai megalos auto itan thx

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • UPDATE: Today I received 3 emails from PayPal stating the case was in my favor and I successfully got the full payment back from these scammers.   A warning to all - do NOT deal with this Unsimple as there are way more options out there that are honest and actually professional. Feel free to DM me if you have any more info about Unsimple and their shady practices or want advice.
    • i would like to add this option into Autofarm, if anyone have it or know someone, let me know thanks.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/bDVQYKMUb3 https://campsite.bio/utchihaamkt
    • Hello guys who know what me need to change in code to use buff with cast animation like this:       package net.sf.l2j.gameserver.model.actor.instance; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import net.sf.l2j.commons.lang.StringUtil; import net.sf.l2j.commons.math.MathUtil; import net.sf.l2j.Config; import net.sf.l2j.gameserver.data.SkillTable; import net.sf.l2j.gameserver.data.manager.BufferManager; import net.sf.l2j.gameserver.data.manager.BufferManager.BufferSchemeType; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.model.actor.Summon; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.skills.L2Skill; public class SchemeBuffer extends Folk { private static final int PAGE_LIMIT = 6; public SchemeBuffer(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(Player player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String currentCommand = st.nextToken(); if (currentCommand.startsWith("menu")) { final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(player, getNpcId(), 0)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } else if (currentCommand.startsWith("cleanup")) { player.stopAllEffectsExceptThoseThatLastThroughDeath(); final Summon summon = player.getSummon(); if (summon != null) summon.stopAllEffectsExceptThoseThatLastThroughDeath(); final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(player, getNpcId(), 0)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } else if (currentCommand.startsWith("heal")) { player.getStatus().setMaxCpHpMp(); final Summon summon = player.getSummon(); if (summon != null) summon.getStatus().setMaxHpMp(); final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(player, getNpcId(), 0)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } else if (currentCommand.startsWith("support")) showGiveBuffsWindow(player); else if (currentCommand.startsWith("getscheme")) BufferManager.getInstance().getSchemeSkills(BufferSchemeType.valueOf(st.nextToken().toUpperCase())).forEach(buffId -> getEffect(player, buffId)); else if (currentCommand.startsWith("getbuff")) { final int skillId = Integer.parseInt(st.nextToken()); final int skillLevel = Integer.parseInt(st.nextToken()); List<L2Skill> list = new ArrayList<>(); list.add(SkillTable.getInstance().getInfo(skillId, skillLevel)); int cost = getFee(list); if (cost == 0 || player.reduceAdena("NPC Buffer", cost, this, true)) list.forEach(buffId -> getEffect(player, buffId)); } else if (currentCommand.startsWith("singlebuff")) showSingleBuffSelectionWindow(player, st.nextToken(), Integer.parseInt(st.nextToken())); else if (currentCommand.startsWith("givebuffs")) { final String schemeName = st.nextToken(); final int cost = Integer.parseInt(st.nextToken()); Creature target = null; if (st.hasMoreTokens()) { final String targetType = st.nextToken(); if (targetType != null && targetType.equalsIgnoreCase("pet")) target = player.getSummon(); } else target = player; if (target == null) player.sendMessage("You don't have a pet."); else if (cost == 0 || player.reduceAdena("NPC Buffer", cost, this, true)) BufferManager.getInstance().applySchemeEffects(this, target, player.getObjectId(), schemeName); } else if (currentCommand.startsWith("editschemes")) showEditSchemeWindow(player, st.nextToken(), st.nextToken(), Integer.parseInt(st.nextToken())); else if (currentCommand.startsWith("skill")) { final String groupType = st.nextToken(); final String schemeName = st.nextToken(); final int skillId = Integer.parseInt(st.nextToken()); final int skillLevel = Integer.parseInt(st.nextToken()); final int page = Integer.parseInt(st.nextToken()); L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel); final List<L2Skill> skills = BufferManager.getInstance().getScheme(player.getObjectId(), schemeName); premiumSkills(player, skills); if (currentCommand.startsWith("skillselect") && !schemeName.equalsIgnoreCase("none")) { if (skills.size() < player.getMaxBuffCount()) skills.add(skill); else player.sendMessage("This scheme has reached the maximum amount of buffs."); } else if (currentCommand.startsWith("skillunselect")) skills.remove(skill); showEditSchemeWindow(player, groupType, schemeName, page); } else if (currentCommand.startsWith("createscheme")) { try { final String schemeName = st.nextToken(); if (schemeName.length() > 14) { player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed."); return; } final Map<String, ArrayList<L2Skill>> schemes = BufferManager.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes != null) { if (schemes.size() == Config.BUFFER_MAX_SCHEMES) { player.sendMessage("Maximum schemes amount is already reached."); return; } if (schemes.containsKey(schemeName)) { player.sendMessage("The scheme name already exists."); return; } } BufferManager.getInstance().setScheme(player.getObjectId(), schemeName.trim(), new ArrayList<>()); showGiveBuffsWindow(player); } catch (Exception e) { player.sendMessage("Scheme's name must contain up to 14 chars. Spaces are trimmed."); } } else if (currentCommand.startsWith("deletescheme")) { try { final String schemeName = st.nextToken(); final Map<String, ArrayList<L2Skill>> schemes = BufferManager.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes != null && schemes.containsKey(schemeName)) schemes.remove(schemeName); } catch (Exception e) { player.sendMessage("This scheme name is invalid."); } showGiveBuffsWindow(player); } super.onBypassFeedback(player, command); } private void getEffect(Player player, L2Skill buff) { buff.getEffects(this, player); } @Override public String getHtmlPath(Player player, int npcId, int val) { String filename = ""; if (val == 0) filename = "" + npcId; else filename = npcId + "-" + val; return player.isLang() + "mods/buffer/" + filename + ".htm"; } /** * Send an html packet to the {@link Player} set a parameter with Give Buffs menu info for player and pet, depending on targetType parameter {player, pet}. * @param player : The {@link Player} to make checks on. */ private void showGiveBuffsWindow(Player player) { final StringBuilder sb = new StringBuilder(200); final Map<String, ArrayList<L2Skill>> schemes = BufferManager.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) sb.append("<font color=\"LEVEL\">You haven't defined any scheme.</font>"); else { for (Map.Entry<String, ArrayList<L2Skill>> scheme : schemes.entrySet()) { final int cost = getFee(scheme.getValue()); StringUtil.append(sb, "<font color=\"LEVEL\">", scheme.getKey(), " [", scheme.getValue().size(), " / ", player.getMaxBuffCount(), "]", ((cost > 0) ? " - cost: " + StringUtil.formatNumber(cost) : ""), "</font><br1>"); StringUtil.append(sb, "<a action=\"bypass npc_%objectId%_givebuffs ", scheme.getKey(), " ", cost, "\">Use on Me</a>&nbsp;|&nbsp;"); StringUtil.append(sb, "<a action=\"bypass npc_%objectId%_givebuffs ", scheme.getKey(), " ", cost, " pet\">Use on Pet</a>&nbsp;|&nbsp;"); StringUtil.append(sb, "<a action=\"bypass npc_%objectId%_editschemes Buffs ", scheme.getKey(), " 1\">Edit</a>&nbsp;|&nbsp;"); StringUtil.append(sb, "<a action=\"bypass npc_%objectId%_deletescheme ", scheme.getKey(), "\">Delete</a><br>"); } } final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(player, getNpcId(), 1)); html.replace("%schemes%", sb.toString()); html.replace("%max_schemes%", Config.BUFFER_MAX_SCHEMES); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } /** * Send an html packet to the {@link Player} set as parameter with Edit Scheme Menu info. This allows the {@link Player} to edit each created scheme (add/delete skills) * @param player : The {@link Player} to make checks on. * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @param page : The current checked page. */ private void showEditSchemeWindow(Player player, String groupType, String schemeName, int page) { final NpcHtmlMessage html = new NpcHtmlMessage(0); final List<L2Skill> schemeSkills = BufferManager.getInstance().getScheme(player.getObjectId(), schemeName); premiumSkills(player, schemeSkills); html.setFile(getHtmlPath(player, getNpcId(), 2)); html.replace("%schemename%", schemeName); html.replace("%count%", schemeSkills.size() + " / " + player.getMaxBuffCount()); html.replace("%typesframe%", getTypesFrame(player, groupType, schemeName, false)); html.replace("%skilllistframe%", getGroupSkillList(player, groupType, schemeName, false, page)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } private void showSingleBuffSelectionWindow(Player player, String groupType, int page) { final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(player, getNpcId(), 3)); html.replace("%typesframe%", getTypesFrame(player, groupType, "", true)); html.replace("%skilllistframe%", getGroupSkillList(player, groupType, "", true, page)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } /** * @param player : The {@link Player} to make checks on. * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @param singleSelection : Indicate if it's single buff selection or not. * @param page : The current checked page. * @return A {@link String} representing skills available for selection for a given groupType. */ private String getGroupSkillList(Player player, String groupType, String schemeName, boolean singleSelection, int page) { // Retrieve the entire skills list based on group type. List<L2Skill> skills = BufferManager.getInstance().getSkillsIdsByType(groupType); premiumSkills(player, skills); if (skills.isEmpty()) return "That group doesn't contain any skills."; // Calculate page number. final int max = MathUtil.countPagesNumber(skills.size(), PAGE_LIMIT); if (page > max) page = max; // Cut skills list up to page number. skills = skills.subList((page - 1) * PAGE_LIMIT, Math.min(page * PAGE_LIMIT, skills.size())); final List<L2Skill> schemeSkills = BufferManager.getInstance().getScheme(player.getObjectId(), schemeName); final StringBuilder sb = new StringBuilder(skills.size() * 150); int row = 0; for (L2Skill skill : skills) { int skillId = skill.getId(); int skillLevel = skill.getLevel(); sb.append(((row % 2) == 0 ? "<table width=\"280\" bgcolor=\"000000\"><tr>" : "<table width=\"280\"><tr>")); if (singleSelection) StringUtil.append(sb, "<td height=40 width=40><button action=\"bypass npc_" + getObjectId() + "_getbuff ", skillId, " ", skillLevel, " ", "\" width=32 height=32 back=\"", skill.getIcon(), "\" fore=\"", skill.getIcon(), "\" /></td><td width=190>", SkillTable.getInstance().getInfo(skillId, 1).getName(), "<br1><font color=\"B09878\">", BufferManager.getInstance().getAvailableBuff(skill).getDescription(), "</font></td>"); else { if (schemeSkills.contains(skill)) StringUtil.append(sb, "<td height=40 width=40><img src=\"", skill.getIcon(), "\" width=32 height=32></td><td width=190>", SkillTable.getInstance().getInfo(skillId, 1).getName(), "<br1><font color=\"B09878\">", BufferManager.getInstance().getAvailableBuff(skill).getDescription(), "</font></td><td><button action=\"bypass npc_%objectId%_skillunselect ", groupType, " ", schemeName, " ", skillId, " ", skillLevel, " ", page, "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomout2\" fore=\"L2UI_CH3.mapbutton_zoomout1\"></td>"); else StringUtil.append(sb, "<td height=40 width=40><img src=\"", skill.getIcon(), "\" width=32 height=32></td><td width=190>", SkillTable.getInstance().getInfo(skillId, 1).getName(), "<br1><font color=\"B09878\">", BufferManager.getInstance().getAvailableBuff(skill).getDescription(), "</font></td><td><button action=\"bypass npc_%objectId%_skillselect ", groupType, " ", schemeName, " ", skillId, " ", skillLevel, " ", page, "\" width=32 height=32 back=\"L2UI_CH3.mapbutton_zoomin2\" fore=\"L2UI_CH3.mapbutton_zoomin1\"></td>"); } sb.append("</tr></table><img src=\"L2UI.SquareGray\" width=280 height=1>"); row++; } for (int i = PAGE_LIMIT; i > row; i--) StringUtil.append(sb, "<img height=41>"); // Build page footer. sb.append("<br><img src=\"L2UI.SquareGray\" width=280 height=1><table width=\"100%\" bgcolor=000000><tr>"); if (page > 1) { if (singleSelection) StringUtil.append(sb, "<td align=left width=70><a action=\"bypass npc_" + getObjectId() + "_singlebuff ", groupType, " ", page - 1, "\">Previous</a></td>"); else StringUtil.append(sb, "<td align=left width=70><a action=\"bypass npc_" + getObjectId() + "_editschemes ", groupType, " ", schemeName, " ", page - 1, "\">Previous</a></td>"); } else StringUtil.append(sb, "<td align=left width=70>Previous</td>"); StringUtil.append(sb, "<td align=center width=100>Page ", page, "</td>"); if (page < max) { if (singleSelection) StringUtil.append(sb, "<td align=right width=70><a action=\"bypass npc_" + getObjectId() + "_singlebuff ", groupType, " ", page + 1, "\">Next</a></td>"); else StringUtil.append(sb, "<td align=right width=70><a action=\"bypass npc_" + getObjectId() + "_editschemes ", groupType, " ", schemeName, " ", page + 1, "\">Next</a></td>"); } else StringUtil.append(sb, "<td align=right width=70>Next</td>"); sb.append("</tr></table><img src=\"L2UI.SquareGray\" width=280 height=1>"); return sb.toString(); } /** * @param player * @param groupType : The group of skills to select. * @param schemeName : The scheme to make check. * @param singleSelection : Indicate if it's single buff selection or not. * @return A {@link String} representing all groupTypes available. The group currently on selection isn't linkable. */ private static String getTypesFrame(Player player, String groupType, String schemeName, boolean singleSelection) { final StringBuilder sb = new StringBuilder(500); sb.append("<table>"); int count = 0; for (String type : BufferManager.getInstance().getSkillTypes()) { if (player.getPremiumService() == 0) { if (Config.PREMIUM_BUFFS_CATEGORY.isEmpty()) continue; } if (count == 0) sb.append("<tr>"); if (groupType.equalsIgnoreCase(type)) StringUtil.append(sb, "<td width=65>", type, "</td>"); else { if (singleSelection) StringUtil.append(sb, "<td width=65><a action=\"bypass npc_%objectId%_singlebuff ", type, " 1\">", type, "</a></td>"); else StringUtil.append(sb, "<td width=65><a action=\"bypass npc_%objectId%_editschemes ", type, " ", schemeName, " 1\">", type, "</a></td>"); } count++; if (count == 4) { sb.append("</tr>"); count = 0; } } if (!sb.toString().endsWith("</tr>")) sb.append("</tr>"); sb.append("</table>"); return sb.toString(); } /** * @param list : A {@link List} of skill ids. * @return a global fee for all skills contained in the {@link List}. */ private static int getFee(List<L2Skill> list) { if (Config.BUFFER_STATIC_BUFF_COST > 0) return list.size() * Config.BUFFER_STATIC_BUFF_COST; int fee = 0; for (L2Skill sk : list) fee += BufferManager.getInstance().getAvailableBuff(sk).getPrice(); return fee; } private void premiumSkills(Player player, List<L2Skill> skills) { if (player.getPremiumService() == 0) skills.removeIf(skill -> Config.BUFFS_CATEGORY.contains(BufferManager.getInstance().getAvailableBuff(skill).getType())); } }
    • We've worked hard for 14 years to gather all the information for your preferred type of game server - we've put together your ideas, your suggestions, information and researches from different knowledge bases and we've made a lot of tests to make the project as good as you love it. Our goal is to create a masterpiece that everyone can enjoy. We are one of the best server and we will be forever. There are many things we did damn right in the past and we will do more in future! Because of that - you're going to see many things you have not seen before on any other servers! Our team knows what you want and what we should do! You value quality and technical excellence? You need safety and exceptional security? You seek true adventures, unique game world, exquisite and eventful game? It means you are in right place! Welcome to L2Blaze, only here you will find and enjoy real game! X150 WARFIRE INTERLUDE NEW SEASON 2024 SEPTEMBER 27th! Opening time: 19:00 UTC+3 Poland opening time: 18:00 UTC+2 Norway opening time: 18:00 UTC+2 UK opening time: 17:00 UTC+1 Brazil opening time: 11:00 UTC-3 OPENING BONUS Opening bonus for first 100 players who will reach 3rd class will receive VIP Coin as bonus! Automatic registration on game login window, unnecessary to register in website! Do you want stability? Lagless and bugless game? Instant support? Daily PVP? Long-Term playing? You are in the right place, time to start! How to connect STEP BY STEP: 1. Install clear Lineage2 Interlude client 2. Download our patch, delete old system folder and add our 3. Delete, turn off anti virus or add our system folder to anti virus exceptions 4. Run l2.exe from Lineage2/system 5. Enter data on login window and enjoy the game! * You have to remove, turn off or use exceptions of antivirus because of our security protection. It is not a virus. * If you have connection issues with Windows 8 or 10, press right mouse button on l2.exe icon, press Properties, choose compatibility and unmark compatibility mode. Hearts of War EVENT! Collect War Hearts from Hot Springs monsters: Yeti, Buffalo, Antelope, Bandersnatch, Atroxspawn, Flava, Nepenthes, Grendel (3%), Atrox with (6%) and Heart Breaker Boss in Hot Springs Stage 2! You can trade it, sell it or spend in shop! Raid Boss Heart Breaker spawn every 4 hours (+4 hours random) Custom Raid Boss drop list: - Raid Boss Horus, Ember and Brakki, Nakondas: 1 VIP COIN (25%) | Korim (70%). - Raid Boss Apepi, Shacram, Atraiban, Korim: 1 BEWS (10%). - Raid Boss Glaki, Olkuth: 1-2 BEAS (40%). - Raid Boss Golkonda, Galaxia: 1-3 BEAS (60%). - Raid Boss Shyeed: 1-3 BEWS (30%) | 1-7 BEAS (40%) | 1-5 TOP LS 76 (50%). - Raid Boss Shuriel: 1-7 TOP LS 76 (50%) | 1-4 BEAS (60%). - Raid Boss Ashakiel: 1-2 BEWS (30%) | 1-7 TOP LS 76 (50%) | 1-4 BEAS (75%). - Raid Boss Antharas Priest Cloe: 1-3 BEWS (30%) | 1-7 TOP LS 76 (70%). ------------------------------------------------ - Hestia: Demon Splinters / Forgotten Blande (30%). - Ember: Arcana Mace / Draconic Bow (30%). - Galaxia: Angel Slayer / Heaven's Divider (30%) Take your friends, clan, alliance, enemys, sharp your sword, clean your armors and meet your destiny at 2024 SEPTEMBER 27th! WEBSITE: http://WWW.L2BLAZE.NET
  • Topics

×
×
  • Create New...