Dasleex25 Posted November 12, 2011 Posted November 12, 2011 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.
0 FighterBoss Posted November 12, 2011 Posted November 12, 2011 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 Dasleex25 Posted November 12, 2011 Author Posted November 12, 2011 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 adenaman Posted November 12, 2011 Posted November 12, 2011 you may need to change title and update db
0 Dasleex25 Posted November 12, 2011 Author Posted November 12, 2011 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.
0 dpbBryan Posted November 12, 2011 Posted November 12, 2011 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 adenaman Posted November 12, 2011 Posted November 12, 2011 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 Dasleex25 Posted November 13, 2011 Author Posted November 13, 2011 adenaman, Forget about it because i can't make it, it's too hard to me...
0 DnR Posted November 20, 2011 Posted November 20, 2011 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.
Question
Dasleex25
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now