Page 1 of 1

Custom/Normal GrandBoss Spawn & AI

Posted: Thu Oct 21, 2010 11:04 pm
by ikarycs
L2J Revision 4422:
L2JDP Revision 7669:

hello guys...

i have been reading on this forum gathering info for about two weeks, trying to build up my own server.
everything run great..

but i have decided that to put every grandbosses (especialy those who drop jewels) without quest, so i would like to know how to disable quest (my server will not have 30+ ppl so RB like frintezza will be imposible) and spawn the boss (with respawn time controlled) so anyone can go and hit/kill.

obviously the //spawn grandbossID doesnt work becouse i get teleported or script error..

so i had an idea, and made some copypaste from the npc table and adapt those to make my custom rb (i modified de ID and the type "l2grandboss" to "l2mosnter" as well) but with this method RB doesnt lauch skills or have any miniom (becouse it doesnt have AI i guess)

i have searched related info in this forum and didnt find anything relevant.

Resumen XD: how can i spawn normal/custom (preferible normal) grandbosses witout quest activation and players doesnt get teleported?

PD: i dont care about cinematics, i just want the bosses bahave like when u get them by quest

thanks..

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Fri Oct 22, 2010 12:26 am
by MELERIX
because skills are in AI, so if you change boss to l2monster you should add skill to him manually.

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Fri Oct 22, 2010 12:44 am
by ikarycs
ok now i note it... but i'm afraid to mess up the RB behavior... i mean..
if i add the skills on database will they be casted randomly? (please answer this)
i saw in valakas.java that it haves some rules like "if hp > 25% -> cast Xskills" adn so on
is there a way to copy just the combat part of the regular fight from the legit RB? adn link it to my new L2monster ID???

thanks for the reply

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Fri Oct 22, 2010 3:14 am
by Szponiasty
ikarycs wrote:ok now i note it... but i'm afraid to mess up the RB behavior... i mean..
if i add the skills on database will they be casted randomly? (please answer this)
i saw in valakas.java that it haves some rules like "if hp > 25% -> cast Xskills" adn so on
is there a way to copy just the combat part of the regular fight from the legit RB? adn link it to my new L2monster ID???

thanks for the reply
In zones.xml you have boss zones defined, like:

Code: Select all

<zone id="12005" type="BossZone" shape="NPoly" minZ="-2208" maxZ="792">
You may try adding "<stat name="EnabledByDefault" val="false"/>" to them, eg:

Code: Select all

 <zone id="12005" type="BossZone" shape="NPoly" minZ="-2208" maxZ="792">   <stat name="EnabledByDefault" val="false"/></zone> 
That will stop moving players to towns once they go into boss zone without being on that zone "allowed" list. You may try also changing BossZonnes to other type. Eg to "NoStoreZone".

To do the rest, you have to make your own eg. admin command handler, with:

Code: Select all

                if (GrandBossManager.getInstance().getBossStatus(Integer.valueOf(id)) != 0)GrandBossManager.getInstance().setBossStatus(Integer.valueOf(id), 0); 
or sth similar at beginning, to set boss status to non spawned. The rest of the code you have to take from bosses AI scripts. If you want all to work like it should (with proper action, minions etc), I'm afraid there is no other possible way.

You may also for example put items needed to enter boss to be buyable. Then put new ai script for all bosses and add

Code: Select all

                if (GrandBossManager.getInstance().getBossStatus(id) != 0)GrandBossManager.getInstance().setBossStatus(id, 0); 
in OnKill event or similar (will clear dead status whevener boss is killed, so players can enter again this boss like right away).
---
I think the best and quickest solution is to just add quest items in shops + setBossStatus(id, 0) for all bosses to onKill. This way probably all will go as designed,through proper scripts, zones, etc.

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Fri Oct 22, 2010 11:19 am
by ikarycs
selling quest item was my first idea.. but it will not solve the problem of bosses like frintezza, beleth and othe complexes rbs wich requiere a whole big process like party and command chanels (most of my players are gonna be underaged kids.. and i know from my own experience that ppl aint gonna read guides even if i set an announce or put guides in the server forum).

i think ill stay with my custom raidmobs dealing only mele atacks atm..by the time ill go learning more java lang i will improve they =)...

thanks for the help =)..

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Sat Oct 23, 2010 3:28 am
by Hitokiri
All epics got their own AI. Thei use their skills, guards and so on according their AI. So u need to edit the AI files. Tried with Baium and Antharas just disabled quest. Didnt checked on the other Epics. Yeap and Beleth isnt working now because his ai isnt released now.

Re: Custom/Normal GrandBoss Spawn & AI

Posted: Sat Oct 23, 2010 1:09 pm
by ikarycs
well i tryed to de edit every ai acording with what i want... but the code is quite complex so i decided to dont touch anything... i always try to use common sense to edit scripts but i can barely handle it... i've done/edit some scripts ieasiers programs like autohotkeys or eventualy in php... but java is beyond my knowledge =(...