|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |
 |
|
 |

09-14-2014, 01:51 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
Looks like the ghoul_executioner is activating on death an already running spawn2 condition, perhaps this is gumming up the works.
Possible solution is to make a copy of the a_ghoul_executioner npc of 66092, which would become I assume on your server perhaps 66180 since your controller npc is 66179, then use that in your controller script as the spawned npc. Rename the a_ghoul_executioner.pl to 66180.pl, but remove the signalling of the controller npc part. Also create a 66092.pl (the original a ghoul executioner) and set an event based on death as before to signal the controller mob, but to NOT modify the spawn conditions.
When the original a_ghoul_executioner(66092) is killed, the controller mob is signaled, but the existing spawn2 conditions are not modified, then when the new a_ghoul_executioner spawns, it is the 66180 version, and on death, will re-enable the original spawn2 condition that the controller npc turned off after the timer expired.
Would look like this:
66092.pl (original npc id of executioner)
Code:
sub EVENT_DEATH_COMPLETE {
quest::signalwith(66179,1);
}
66180.pl (or whatever the new npc id of the copied executioner is)
Code:
sub EVENT_DEATH_COMPLETE {
quest::enable_spawn2(9968);
}
controller.pl
Code:
sub EVENT_SIGNAL {
if($signal==1) {
quest::settimer("exec",60);
}
}
sub EVENT_TIMER {
if($timer eq "exec") {
quest::disable_spawn2(9968);
quest::spawn2(66180,0,0,-890,622,-203,53.5);
}
}
This keeps the spirit of your original idea instead of just changing the spawn timer for that spawn group.
I have not tried this myself to verify though, but if I see no response I will build in on my test rig and test it either tomorrow or the next day..
|
 |
|
 |
 |
|
 |

09-14-2014, 02:49 PM
|
Hill Giant
|
|
Join Date: Jun 2005
Posts: 105
|
|
Quote:
Originally Posted by rencro
Looks like the ghoul_executioner is activating on death an already running spawn2 condition, perhaps this is gumming up the works.
Possible solution is to make a copy of the a_ghoul_executioner npc of 66092, which would become I assume on your server perhaps 66180 since your controller npc is 66179, then use that in your controller script as the spawned npc. Rename the a_ghoul_executioner.pl to 66180.pl, but remove the signalling of the controller npc part. Also create a 66092.pl (the original a ghoul executioner) and set an event based on death as before to signal the controller mob, but to NOT modify the spawn conditions.
When the original a_ghoul_executioner(66092) is killed, the controller mob is signaled, but the existing spawn2 conditions are not modified, then when the new a_ghoul_executioner spawns, it is the 66180 version, and on death, will re-enable the original spawn2 condition that the controller npc turned off after the timer expired.
Would look like this:
66092.pl (original npc id of executioner)
Code:
sub EVENT_DEATH_COMPLETE {
quest::signalwith(66179,1);
}
66180.pl (or whatever the new npc id of the copied executioner is)
Code:
sub EVENT_DEATH_COMPLETE {
quest::enable_spawn2(9968);
}
controller.pl
Code:
sub EVENT_SIGNAL {
if($signal==1) {
quest::settimer("exec",60);
}
}
sub EVENT_TIMER {
if($timer eq "exec") {
quest::disable_spawn2(9968);
quest::spawn2(66180,0,0,-890,622,-203,53.5);
}
}
This keeps the spirit of your original idea instead of just changing the spawn timer for that spawn group.
I have not tried this myself to verify though, but if I see no response I will build in on my test rig and test it either tomorrow or the next day..
|
That's awesome, that almost fixed everything. I had to add a stoptimer function to the controller. The only issue now though is the spawncycle is activated but it won't start popping until I do a #repop.
Thanks for the help so far!
|
 |
|
 |

09-14-2014, 03:16 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 904
|
|
Why don't you just handle the entire spawn cycle with the controller?
You're already basically doing it. Have the timer setup so that it runs through a timer chain:
timer1 18 mins, spawns random mob, signals controller, starts timer 2
timer2 18 mins, spawns random mob, signals controller, starts timer 3
timer3 18 mins, guaranteed executioner, starts timer 1
The caveat is that if an executioner spawns in timer1 or timer2 it signals the controller to stop the current timer and restart at timer 1.
Don't have time to write out the code but you get the idea. This would be easy to copy and paste for multiple NPCs / controllers.
|

09-14-2014, 04:50 PM
|
Hill Giant
|
|
Join Date: Jun 2005
Posts: 105
|
|
Quote:
Originally Posted by chrsschb
Why don't you just handle the entire spawn cycle with the controller?
You're already basically doing it. Have the timer setup so that it runs through a timer chain:
timer1 18 mins, spawns random mob, signals controller, starts timer 2
timer2 18 mins, spawns random mob, signals controller, starts timer 3
timer3 18 mins, guaranteed executioner, starts timer 1
The caveat is that if an executioner spawns in timer1 or timer2 it signals the controller to stop the current timer and restart at timer 1.
Don't have time to write out the code but you get the idea. This would be easy to copy and paste for multiple NPCs / controllers.
|
I like this idea, but wouldn't I have to have separate mobs for each chain firing off the timers? Otherwise you'd have multiple spawns on the same point if they aren't being killed. Or maybe I'm misunderstanding here
|

09-14-2014, 09:11 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 904
|
|
Eh ignore my post earlier, I was rushing. I'll get something up if no one beats me to it.
|
 |
|
 |

09-14-2014, 09:47 PM
|
 |
Dragon
|
|
Join Date: Nov 2008
Location: GA
Posts: 904
|
|
K, so in order for this to work each NPC in the spawn cycle needs to be unique to that spawn cycle. Other wise random NPCs in the zone will signal the controller and mess up the cycle.
Cycle assumes a 10 minute respawn timer and will spawn a named on the 6th spawn guaranteed.
Code:
#Each NPC in Spawn Cycle including Named
sub EVENT_DEATH {
#Replace with NPCID of Controller
quest::signalwith(npcid, 1);
}
Code:
#Controller
#Script assumes spawn cycle is 10 minutes
#Script assumes controller is the physical location of the spawned npc
sub EVENT_SPAWN {
$counter == 0;
#Replace with NPCIDs of Place Holders AND Named NPC
quest::spawn2(quest::ChooseRandom(npcid,npcid,npcid),0,0,$x,$y,$z,$h);
}
sub EVENT_TIMER {
if($timer eq "NPCID_SpawnCycle"); {
#Replace with NPCIDs of Place Holders AND Named NPC
quest::spawn2(quest::ChooseRandom(npcid,npcid,npcid),0,0,$x,$y,$z,$h);
quest::stoptimer("NPCID_SpawnCycle");
}
elsif($timer eq "NPCID_Spawned"); {
#Replace with NPCID of Named NPC
quest::spawn2(npcid,0,0,$x,$y,$z,$h);
quest::stoptimer("NPCID_Spawned");
}
}
sub EVENT_SIGNAL {
my $globalname = "NPCID_Controller";
if ($signal == 1) {
$counter +=1;
if (!defined $qglobals($globalname) && ($counter <= 5)) {
quest::starttimer("NPCID_SpawnCycle",600);
}
elsif (!defined $qglobals($globalname) && ($counter == 6)) {
quest::starttimer("NPCID_Spawned",600);
$counter == 0;
}
}
}
In the chooserandom to make the named more rare, put more placeholder ids in there. So for a 10% spawn chance you'd need 10 ids in the parenthesis.
This also assumes people are actively killing the spawn. IE this replicates a regular spawn cycle except with a guaranteed named at least once per hour.
|
 |
|
 |

09-18-2014, 09:14 AM
|
Hill Giant
|
|
Join Date: Jun 2005
Posts: 105
|
|
Thanks for the solution chrsschb, wow to decide if doing this for every single named spawn is going to be worth the work 
|
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 07:36 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |