Jump to content
  • 0

Interlude npc buffer


Question

Posted

Interlude L2j and L2jdb server last update

Oneo Npc Buffer

Script 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 < 150000  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())

		if event == "2":
			st.takeItems(ADENA_ID,160000)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4360,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4359,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4358,3),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4357,2),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4354,4),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4353,6),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4350,4),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4347,6),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1218,33),False,False)
			st.getplayer().recoverHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1013,32),False,False)
			st.getplayer().recoverHPMP()		
			return "4.htm"
			st.setState(COMPLETED)

The Line "st.getplayer().recoverHPMP()" Couse a Script Error as a result stoping the script and dont doing Hp/Mp recover.

I need an other commant to replace with. (i tride Gm Heal commant from the core but i dont know java to find the right one.)

2 answers to this question

Recommended Posts

  • 0
Posted

and if count < 150000  or st.getPlayer().getLevel() < 10 :

 

Erm Do You Know What This Means??

 

The "Code" You Gave Has Nothing To Do With That....

 

This Code Is That If The Player Hasnt 150k Adena Or His Is Lower Than 10 Level The Buffer Can't Buff Him...

 

---------------------------------------------------------------------------------------------------------

 

 

Try This One As An HP Recovery

 

#Greater Heal
if event == "70":
st.takeItems(ADENA_ID,0)
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1217,1),False,False)
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(COMPLETED)	

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Information Selling a premium Lineage 2 High Five (L2J) project with active development, available by subscription. Includes Git support and access to compiled or full source code. Ideal for serious server owners seeking stability and performance, uniqueness and well-done features.   Some feature (Some of the features are driven by a youtube video to get a slight idea of how they look)   1. Tournament Single & Party (Check Youtube Video) 2. Faction (Check Youtube Video) 3. Event Engine (Check Youtube Video) 4. Sell Buff System (Check Youtube Video) 5. Start UP System (Check Youtube Video) 6. User Panel 7. Visual - Dress me System 8. Donate Store 9. Automatic Farm System (Check Youtube Video) 10. Captcha (Anti-BOT) (Check Youtube Video) 11. Auction (Check Youtube Video) 12. Vote (API) 13. Admin Real Time Balance (Check Youtube Video) 14. Achievements (Check Youtube Video) 15. Daily Mission (Check Youtube Video) 16. A.I. Bot (Check Youtube Video) 17. Rebirth 18. Daily Reward  19. Skill Tree - Ability System 20. Craft System 21. Twitch Automatic Reward (Check Youtube Video) 22. Quiz Game (Check Youtube Video) 23. Automatic Item Enchant (Check Youtube Video) 24. Secondary Auth Using Google Authenticator (Check Youtube Video) 25. Gm Shop - Gatekeeper - Scheme Buffer   How to get Access (Payment Subscription): To get Access you either pay monthly subscription to GIT for source or Compiled. Project is currently active and has at least 1-2 commit / day.  Clients in both Compiled & Source subscription can request features or any addon in already existing mods inside discord.   Price per Month (Source) in GIT: 250 Eur Price per Month (Compiled) in GIT: 100 Eur   Contact: To get Access or ask further information join discord  https://discord.gg/gKAsAhJNuq      
    • We're officially closing the current season today. While we focus on refining the Essence project, our resources will temporarily shift toward supporting the Classic server.
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...