Jump to content
  • 0

Change monster title after he die


Dasleex25

Question

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.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

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 ?

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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?

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

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

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