Jump to content
  • 0

[help]NPC say's text on spawn (pyton script)



Good day,

Help me please with script, how change script to make NPC say text when hi spawn

import sys

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

from com.l2jfrozen.gameserver.network.serverpackets import CreatureSay

from com.l2jfrozen.util.random import Rnd


# timak_orc_overlord

class timak_orc_overlord(JQuest) :


# init function. Add in here variables that you'd like to be inherited by subclasses (if any)

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

self.timak_orc_overlord = 20588

self.FirstAttacked = False

# finally, don't forget to call the parent constructor to prepare the event triggering

# mechanisms etc.



def onAttack (self,npc,player,damage,isPet):


if self.FirstAttacked:

if Rnd.get(50) : return

npc.broadcastPacket(CreatureSay(objId,0,npc.getNam e(),"Dear ultimate power!!!"))

else :

self.FirstAttacked = True



def onKill (self,npc,player,isPet):

npcId = npc.getNpcId()

if npcId == self.timak_orc_overlord:


self.FirstAttacked = False

elif self.FirstAttacked :

self.addSpawn(npcId,npc.getX(), npc.getY(), npc.getZ(),npc.getHeading(),True,0)



QUEST = timak_orc_overlord(-1,"timak_orc_overlord","ai")


CREATED = State('Start', QUEST)






Link to comment
Share on other sites

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.

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...

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