|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
03-18-2014, 01:12 PM
|
Hill Giant
|
|
Join Date: Feb 2010
Posts: 207
|
|
Boss Script, activate mobs during
Hola,
I'm making a boss fight where I want to have 4 inactive mobs in the room become active at certain percentages during the fight.
Is there a way to call on a separate mob to become active, or, would the easiest way be for me to just have it spawn another version of it on the placeholder?
|
|
|
|
03-18-2014, 01:28 PM
|
Hill Giant
|
|
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
|
|
theres a few options for this. Lets say you want it every 25%, you could do:
on the boss:
Code:
sub EVENT_HP {
if ($hpevent == 75) {
quest::signalwith(xxxxx,#,0); #xxxx = Add NPC ID, # = signal number (if using multiple signals), the third entry = delay in miliseconds (again i think)
quest::setnexthpevent(50); #set the next hp event since you have passed your first one (which you will need to initalize in a different spot, under its spawn, or combat or w/e you chose.
if ($hpevent == 50) {
#Etc Etc
}
}
Then on the adds, you have a few options, you can use the signal to just depop and repop the mob,
Code:
sub EVENT_SIGNAL {
if ($signal == 1) { #Or w/e number you chose)
quest::spawn2(npcid,0,0,x,y,z,h); #spawn a combatitive version
quest::depop(); #depop the untargetable/sleeping mob
}
}
Alternatively, you can just have the boss script include the spawn2 stuff at the hp, and ignore the signals all together, just have the boss depop the mob and spawn a targetable version in the same xyzh location.
Something ive been playing with alot recently has been using perl to set the bodytype of mobs when they spawn, and then using signals or events to change it to a targetable body type - $npc->SetBodyType(#); (i think)
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
|
|
|
|
|
|
|
03-18-2014, 01:36 PM
|
Hill Giant
|
|
Join Date: Feb 2010
Posts: 207
|
|
So, I started playing with it while waiting for a reply and this is what I've thrown in so far:
Code:
sub EVENT_SPAWN {
quest::setnexthpevent(80);
}
sub EVENT_HP {
if($hpevent == 80) {
quest::depopall(#);
quest::spawn2(ID,coordinates);
}
}
This works pretty easily. Basically just making the 'placeholder' go away, I could use the same npc and add in a:
"quest::modifynpcstat("special_attacks","AAAA" );"
to turn the new npc on aswell. Seems like this is a pretty easy option?
EDIT:
Looking at your example a second time, Dungeon, your second line: "quest::depop();" ... In that specific instance would you have a separate mob created for every "placeholder" position, or just use the same npc and have it statically spawn without being targetable etc etc then use a modifynpcstat to "turn it on" when you respawn it?
Actually .. it just occurred to me that modifynpcstat is going to modify the BOSS'S special attack's, not the add I'm trying to activate. So, would the best way be to have placeholders for each position then spawn another version that actually fights?
|
|
|
|
03-18-2014, 01:43 PM
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
That, or have the boss signal the mob to do stuff (as in modify the special attacks)
|
03-18-2014, 01:48 PM
|
Hill Giant
|
|
Join Date: Feb 2010
Posts: 207
|
|
Quote:
Originally Posted by demonstar55
That, or have the boss signal the mob to do stuff (as in modify the special attacks)
|
How exactly do the signals work? Do you know of any good walk-through for them? I haven't used any signals yet.
Would I set the signal in the bosses .pl file and then create another .pl folder for the individual mob and that signal calls on the other file?
|
03-18-2014, 02:40 PM
|
Hill Giant
|
|
Join Date: Feb 2010
Posts: 207
|
|
Okay, got it down to a very simple script. I have inactive versions of my mobs that are placeholders, and then I created the mobs that will spawn during the event. Simple quest that depops the placeholder and spawns the active version.
Code:
sub EVENT_SPAWN {
quest::setnexthpevent(80);
}
sub EVENT_HP {
if($hpevent == 80) {
quest::depopall(9980009);
quest::spawn2(9980017,0,0,55.9,-18,5.5,204.4);
quest::setnexthpevent(60);
}
if($hpevent == 60) {
quest::depopall(9980010);
quest::spawn2(9980018,0,0,34.9,47.5,5.5,152.6);
quest::setnexthpevent(40);
}
if($hpevent == 40) {
quest::depopall(9980011);
quest::spawn2(9980019,0,0,-34.6,47.5,5.5,102);
quest::setnexthpevent(20);
}
if($hpevent == 20) {
quest::depopall(9980012);
quest::spawn2(9980020,0,0,-56.5,-18,5.5,51.4);
}
}
I also want this boss to become "active" by handing him 4 items; anyone have a good example of that part of a quest?
Thanks for the help!
|
03-19-2014, 11:19 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
The best thing to do is to do it all from the boss mobs and access the other mobs from there using the entity list.
Look at the Keledrix or Noquifel scripts and controllers in Inktuta.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 04:27 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|