Jump to content
  • 0

Change monster title after he die


Question

Posted

Hello. Can someone help me to make code which changes title to monster after he die? I tried setTitle(); function, but when i killed monster and when he respawned he was with his basic title.

10 answers to this question

Recommended Posts

  • 0
Posted

How you want it exactly ?

 

There are title A, title B and title C.

 

When server starts mob has title A,after he dies and respawn has title B.

But if it die again what title will have? title A? or title C ?

  • 0
Posted

How you want it exactly ?

 

There are title A, title B and title C.

 

When server starts mob has title A,after he dies and respawn has title B.

But if it die again what title will have? title A? or title C ?

 

Let's say A = Good B = Evil

When server starts monster have title A when he dies, check killer faction if good, then title will stays A if killer was evil then monster title changes to B.

  • 0
Posted

With:

UPDATE npc SET title=... WHERE id =...

? If yes, so don't i need to write //reload npc  on every he die, because when he spawns, server will not reload npcs.

 

I'm not sure I haven't tried it myself, but try to see if you can locate the code where you change your own title (the nick command). Trace and see through the debugger what's going on and perhaps you can replace this also for NPCs.

  • 0
Posted

oh nvm

it can not be done by the db or datatables (templates) because that will change all the title of the same mobs and not only 1 of them

 

edit:

you may have to play with the spawn tables and delete your old L2Spawn,

copy template,

change template,

create new L2Spawn(newtemlate),

and add the new L2Spawn to the spawntable

(add and delete from spawntable with false in the second parameter to not modify the db)

 

edit2:

This forum si kinda fucked  or its just me?

  • 0
Posted

adenaman,

Forget about it because i can't make it, it's too hard to me...

 

You have to modify NpcTable either way.Set serversidetitle of the selected monster to 1, or client title will be the default one,no matter what you do.

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


×
×
  • 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