Jump to content
  • 0

Question

Posted

hi guys! im trying to write a script for clean the pk of character. Only have a part of them. Anyone can help me to finish it? please

	def onEvent(self,event,st):

		htmltext = event

		count=st.getQuestItemsCount(57)

		if count < 5 :

			htmltext = "ErrorAdena.htm"


		elif st.getPlayer().getPkKills() < 5 :

			htmltext = "ErrorPkKills.htm"


		else:

			st.getPlayer().setTarget(st.getPlayer())


			if event == "RemovePk":

				st.takeItems(57,5)

                st.getPlayer().setPkKills(st.getPlayer().getPkKills() - 5)

                st.playSound("ItemSound.quest_finish")

				st.setState(COMPLETED)

				return "End.htm"	


			if htmltext != event:

				st.setState(COMPLETED)

				st.exitQuest(1)

				return htmltext

 

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.



×
×
  • Create New...