Jump to content

Recommended Posts

Posted

Hi MXc . Ive go some problem whit paiala lvl73-75. It was deleted missing or something like that. Ive serched this quest on this forum but nothing.

And I want to share

144_PailakaInjuredDragon
/
__init__.pyimport sys 
3	from com.l2jserver.gameserver.datatables            import SkillTable 
4	from com.l2jserver.gameserver.instancemanager       import InstanceManager 
5	from com.l2jserver.gameserver.model.actor.instance  import L2PcInstance 
6	from com.l2jserver.gameserver.model.entity               import Instance 
7	from com.l2jserver.gameserver.model.quest           import State 
8	from com.l2jserver.gameserver.model.quest           import QuestState 
9	from com.l2jserver.gameserver.model.quest.jython    import QuestJython as JQuest 
10	from com.l2jserver.gameserver.network.serverpackets import PlaySound 
11	from com.l2jserver.util                             import Rnd 
12	
13	qn = "144_PailakaInjuredDragon" 
14	
15	#NPC 
16	KETRAOSHAMAN = 32499 
17	KOSUPPORTER  = 32502 
18	KOIO         = 32509 
19	KOSUPPORTER2 = 32512 
20	Pailaka3rd   = [18635,18636,18638,18639,18640,18641,18642,18644,18645,18646,18648,18649,18650,18652,18653,18654,18655,18656,18657,18658,18659] 
21	Antelopes    = [18637,18643,18647,18651] 
22	#BOSS 
23	LATANA    = 18660 
24	#ITEMS 
25	SPEAR     = 13052 
26	ENCHSPEAR = 13053 
27	LASTSPEAR = 13054 
28	STAGE1    = 13056 
29	STAGE2    = 13057 
30	PAILAKA3DROP = [8600,8601,8603,8604] 
31	ANTELOPDROP  = [13032,13033] 
32	#REWARDS 
33	PSHIRT    = 13296 
34	#ETC 
35	AMOUNTS1  = [1,2,3,4,5,6,7,8,9,10] 
36	
37	BUFFS={ 
38	"1":[4357,2],#Haste Lv2 
39	"2":[4342,2],#Wind Walk Lv2 
40	"3":[4356,3],#Empower Lv3 
41	"4":[4355,3],#Acumen Lv3 
42	"5":[4351,6],#Concentration Lv6 
43	"6":[4345,3],#Might Lv3 
44	"7":[4358,3],#Guidance Lv3 
45	"8":[4359,3],#Focus Lv3 
46	"9":[4360,3],#Death Wisper Lv3 
47	"10":[4352,2],#Berserker Spirit Lv2 
48	"11":[4354,4],#Vampiric Rage Lv4 
49	"12":[4347,6],#Blessed Body Lv6 
50	} 
51	
52	def isWithinLevel(player): 
53	         if player.getLevel() > 77: 
54	                 return False 
55	         if player.getLevel() < 73: 
56	                 return False 
57	         return True 
58	
59	class Quest (JQuest): 
60	
61	 def __init__(self,id,name,descr): 
62	     JQuest.__init__(self,id,name,descr) 
63	     self.questItemIds = [sTAGE1,STAGE2,SPEAR,ENCHSPEAR,LASTSPEAR,13033,13032] 
64	     self.currentWorld = 0 
65	     self.KilledMobs = 0 
66	     self.Action = {} 
67	
68	 def onAdvEvent (self,event,npc,player) : 
69	     st = player.getQuestState(qn) 
70	     if not st: return 
71	     if str(event) in BUFFS.keys(): 
72	         skillId,level=BUFFS[event] 
73	         playerName = player.getName() 
74	         if self.Action[playerName]['times'] < 4: 
75	             npc.setTarget(player) 
76	             npc.doCast(SkillTable.getInstance().getInfo(skillId,level)) 
77	             self.Action[playerName]['times'] += 1 
78	             htmltext = "32509-06.htm" 
79	             return htmltext 
80	         if self.Action[playerName]['times'] == 4: 
81	             npc.setTarget(player) 
82	             npc.doCast(SkillTable.getInstance().getInfo(skillId,level)) 
83	             self.Action[playerName]['times'] = 5 
84	             htmltext = "32509-05.htm" 
85	             return htmltext 
86	     if event == "Support": 
87	         playerName = player.getName() 
88	         if not playerName in self.Action: 
89	                     htmltext = "32509-06.htm" 
90	                     self.Action[playerName] = {} 
91	                     self.Action[playerName]['times'] = 0 
92	         if playerName in self.Action: 
93	             if self.Action[playerName]['times'] < 5: 
94	                 htmltext = "32509-06.htm" 
95	         if self.Action[playerName]['times'] >= 5: 
96	             htmltext = "32509-04.htm" 
97	         return htmltext 
98	     cond = st.getInt("cond") 
99	     htmltext = event 
100	     if event == "32499-02.htm": 
101	             st.set("cond","1") 
102	             st.setState(State.STARTED) 
103	             st.playSound("ItemSound.quest_accept") 
104	     elif event == "32499-05.htm": 
105	             st.set("cond","2") 
106	             st.playSound("ItemSound.quest_accept") 
107	     elif event == "32502-05.htm": 
108	                 st.set("cond","3") 
109	                 st.playSound("ItemSound.quest_middle") 
110	                 st.giveItems(SPEAR,1) 
111	     elif event == "32512-02.htm": 
112	             st.takeItems(SPEAR,1) 
113	             st.takeItems(ENCHSPEAR,1) 
114	             st.takeItems(LASTSPEAR,1) 
115	     return htmltext 
116	
117	
118	 def onTalk (self,npc,player): 
119	     npcId = npc.getNpcId() 
120	     htmltext = "32499-01.htm" 
121	     st = player.getQuestState(qn) 
122	     if not st: return htmltext 
123	     id = st.getState() 
124	     cond = st.getInt("cond") 
125	     playerName = player.getName() 
126	     if id == State.CREATED: 
127	         st.setState(State.STARTED) 
128	         st.set("cond","0") 
129	     if npcId == KETRAOSHAMAN: 
130	             if cond == 0 and id == State.STARTED: 
131	                     if not isWithinLevel(player): 
132	                             htmltext = "32499-no.htm" 
133	                             st.exitQuest(1) 
134	                     else: 
135	                             self.Action[playerName] = {} 
136	                             self.Action[playerName]['times'] = 0 
137	                             return htmltext 
138	             elif id == State.COMPLETED: 
139	                     htmltext = "32499-no.htm" 
140	             elif cond == 1 or cond == 2 or cond == 3: 
141	                     htmltext = "32499-06.htm" 
142	             else: 
143	                     htmltext = "32499-07.htm" 
144	     elif npcId == KOSUPPORTER: 
145	             if cond == 1 or cond == 2: 
146	                     htmltext = "32502-01.htm" 
147	             else: 
148	                     htmltext = "32502-05.htm" 
149	     elif npcId == KOIO: 
150	             if st.getQuestItemsCount(SPEAR) > 0 and st.getQuestItemsCount(STAGE1) == 0: htmltext = "32509-01.htm" 
151	             if st.getQuestItemsCount(ENCHSPEAR) > 0 and st.getQuestItemsCount(STAGE2) == 0: htmltext = "32509-01.htm" 
152	             if st.getQuestItemsCount(SPEAR) == 0 and st.getQuestItemsCount(STAGE1) > 0: htmltext = "32509-07.htm" 
153	             if st.getQuestItemsCount(ENCHSPEAR) == 0 and st.getQuestItemsCount(STAGE2) > 0: htmltext = "32509-07.htm" 
154	             if st.getQuestItemsCount(SPEAR) == 0 and st.getQuestItemsCount(ENCHSPEAR) == 0: htmltext = "32509-07.htm" 
155	             if st.getQuestItemsCount(STAGE1) == 0 and st.getQuestItemsCount(STAGE2) == 0: htmltext = "32509-01.htm" 
156	             if st.getQuestItemsCount(SPEAR) > 0 and st.getQuestItemsCount(STAGE1) > 0: 
157	                     st.takeItems(SPEAR,1) 
158	                     st.takeItems(STAGE1,1) 
159	                     st.giveItems(ENCHSPEAR,1) 
160	                     htmltext = "32509-02.htm" 
161	             if st.getQuestItemsCount(ENCHSPEAR) > 0 and st.getQuestItemsCount(STAGE2) > 0: 
162	                     st.takeItems(ENCHSPEAR,1) 
163	                     st.takeItems(STAGE2,1) 
164	                     st.giveItems(LASTSPEAR,1) 
165	                     htmltext = "32509-03.htm" 
166	             if st.getQuestItemsCount(LASTSPEAR) > 0: htmltext = "32509-03.htm" 
167	     elif npcId == KOSUPPORTER2: 
168	             if cond == 4: 
169	                         st.giveItems(736,1) 
170	                         st.takeItems(13032,st.getQuestItemsCount(13032)) 
171	                         st.takeItems(13033,st.getQuestItemsCount(13033)) 
172	                         st.giveItems(PSHIRT,1) 
173	                         st.addExpAndSp(28000000, 2850000) 
174	                         st.set("cond","5") 
175	                         st.setState(State.COMPLETED) 
176	                         st.playSound("ItemSound.quest_finish") 
177	                         st.exitQuest(False) 
178	                         instanceObj = InstanceManager.getInstance().getInstance(player.getInstanceId()) 
179	                         instanceObj.setDuration(300000) 
180	                         htmltext = "32512-01.htm" 
181	                         player.setVitalityPoints(20000,true) 
182	             elif id == State.COMPLETED: 
183	                     htmltext = "32512-03.htm" 
184	     return htmltext 
185	    
186	 def onKill(self,npc,player,isPet): 
187	     st = player.getQuestState(qn) 
188	     if not st: return 
189	     npcId = npc.getNpcId() 
190	     cond = st.getInt("cond") 
191	     if npcId == 18654: 
192	             if st.getQuestItemsCount(STAGE1) < 1 and st.getQuestItemsCount(SPEAR) > 0: 
193	                     st.giveItems(STAGE1,1) 
194	     elif npcId == 18649 and st.getQuestItemsCount(ENCHSPEAR) > 0: 
195	             if st.getQuestItemsCount(STAGE2) < 1: 
196	                     st.giveItems(STAGE2,1) 
197	     elif npcId == LATANA: 
198	             st.set("cond","4") 
199	             st.playSound("ItemSound.quest_middle") 
200	             Dwarf = self.addSpawn(KOSUPPORTER2,npc.getX(),npc.getY(),npc.getZ(),npc.getHeading(),False,0,False,npc.getInstanceId()) 
201	     elif npcId in Pailaka3rd: 
202	             if Rnd.get(100) < 30: 
203	                     st.dropItem(npc,player,PAILAKA3DROP[Rnd.get(len(PAILAKA3DROP))],1) 
204	     elif npcId in Antelopes: 
205	             st.dropItem(npc,player,ANTELOPDROP[Rnd.get(len(ANTELOPDROP))],AMOUNTS1[Rnd.get(len(AMOUNTS1))]) 
206	  
207	QUEST       = Quest(144,qn,"Pailaka Injured Dragon") 
208	
209	QUEST.addStartNpc(KETRAOSHAMAN) 
210	QUEST.addTalkId(KETRAOSHAMAN) 
211	QUEST.addTalkId(KOSUPPORTER) 
212	QUEST.addTalkId(KOIO) 
213	QUEST.addTalkId(KOSUPPORTER2) 
214	QUEST.addKillId(18654) 
215	QUEST.addKillId(18649) 
216	QUEST.addKillId(LATANA) 
217	for i in Pailaka3rd: 
218	    QUEST.addKillId(i) 
219	for i in Antelopes: 
220	    QUEST.addKillId(i) 
221	

Insert into __init__.py

data

/

scripts

/

quests

/

144_PailakaInjuredDragon

/

__init__.py

 


 

I tested this code and fully working. but this is not my code  author Rost

 

Posted

Oh my God.

 

Put this "code" in quote/code block.

 

And remove line numbers.

 

And put proper [TAG], otherwise topic will be locked.

  • 5 weeks later...
  • 3 weeks later...
  • 4 weeks later...
Posted

Thanks for answer aya, but I'm having problem to do works it on my server (I use L2JServer too). Can you help me and explain how did you do?

 

Sorry if I'm so inconvenient but, I'm starting with java a few days and it's too hard somthings.

 

Thanks in advance...

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 11-29-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • 🔥 Launch was a success! Over 500 players joined L2Elixir on opening day, and we are holding a steady 420–450 online! We faced extortion attempts and heavy DDoS attacks, but our protections held strong — even if the cost was far higher than expected. What matters is we fought back and kept the server online for you. ⚔️ 💙 Our priority is simple: Deliver a stable, fair, and growing server that will evolve for years to come. We continue to invest in protections, advertising, and development — and we won’t stop. All we ask from YOU is one thing: 👉 Keep playing. The more active the community is, the faster the server grows. 💠 Important Note: We have no paid clans or CPs, no “boosted” groups, no unfair benefits. Everyone has an equal chance to progress and compete. Thank you to everyone who joined, supported, and believed in this project. Let’s make L2Elixir great again — even in 2025–2026! 🚀   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   @Atom Can you please move to Private Servers? Thanks!
    • https://jumpshare.com/share/kIdeKALOhgtMKpBKqxpg Test Equip Armors-> FullPlate, Gloves, Legs, Chest , Boots
    • 黑色星期五 — 为您的流量提供高级福利 仅在11月28日,我们的特别促销码可为您提供13%的商店折扣。 促销码: BLACKFRIDAY (13% 折扣) 您可以通过我们的网站或 Telegram 机器人在商店购物! 有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram Messenger 方便访问商店。 其他服务: 虚拟号码服务: 前往 用于购买 Telegram Stars 的机器人: 前往 – 快速且优惠地在 Telegram 中购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们向您呈现当前的 促销和特惠活动 列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 只需在我们网站注册后发送您的用户名,格式如下:“SEND ME BONUS, MY USERNAME IS...” — 您需要在我们的论坛帖子中写下这句话! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(支持)提交主题为“Get Trial Bonus”的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人每周都会举办 Telegram Stars 抽奖活动! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock