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

08-06-2010, 09:25 AM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
Yup, you are reading this correct. You don't enter variables into the database. Just enable the qglobals for the npc. If you don't want it per player, then just change the options from 0 to 2.
|

08-06-2010, 11:10 AM
|
Hill Giant
|
|
Join Date: Jul 2007
Posts: 111
|
|
Quote:
Originally Posted by joligario
Yup, you are reading this correct. You don't enter variables into the database. Just enable the qglobals for the npc. If you don't want it per player, then just change the options from 0 to 2.
|
thats pretty simple, maybe it was character flags i was having trouble with lol, thanks man
|

08-16-2010, 10:18 PM
|
Hill Giant
|
|
Join Date: Jul 2007
Posts: 111
|
|
Ok this is no longer working. I also tried to do the same thing with a different quest, different variable ect.. it doesnt work.
Can anyone help me fix it or either write it for me?
All i need is
Somthing to keep track of how many of a certain mob the player has killed.
If the player has killed 4, spawn another mob then reset so if the player kills 4 more it will respawn again.
Actually if any player in the zone kills 4 of the mob id like it to spawn so it doesnt get messed up by other people stealing mobs
|

08-17-2010, 12:41 AM
|
Dragon
|
|
Join Date: May 2009
Location: Milky Way
Posts: 539
|
|
Here is a script I use for similar situations that doesnt require globals. This assumes that you want the NPCs to respawn when the last is dead(regardless of kill credit), however the mobs can still respawn normally as well.
You would have an invis controller NPC with this script...
Code:
sub EVENT_SPAWN
{
quest::settimer("start", 6);
}
sub EVENT_TIMER
{
if ($timer eq "start") {
quest::stoptimer("start");
my $counter = 0;
## Get all NPCs in zone
my @npcList = $entity_list->GetNPCList();
foreach $npcs(@npcList) {
## NPC ID you want to be all dead
if($npcs->GetNPCTypeID() == 999999) {
$counter = 1;
}
}
if($counter == 0) {
## NPCs to respawn
quest::spawn2(888888,0,0,x,y,z,h);
quest::spawn2(888888,0,0,x,y,z,h);
quest::spawn2(888888,0,0,x,y,z,h);
quest::spawn2(888888,0,0,x,y,z,h);
}
quest::settimer("start", 6);
}
}
|

08-17-2010, 01:41 PM
|
Hill Giant
|
|
Join Date: Jul 2007
Posts: 111
|
|
Ok instead of respawning the npcs i can make a custom one spawn. ill try it out.
I just tried it, doesnt work.
Ok it works but not the way i need.
It keeps spawning the ancient evil as long as the npcs are dead. I need it to only spawn it once.
Code:
#invisible Ancient Evil Spawning NPC
sub EVENT_SPAWN
{
quest::settimer("start", 6);
}
sub EVENT_TIMER
{
if ($timer eq "start") {
quest::stoptimer("start");
my $counter = 0;
## Get all NPCs in zone
my @npcList = $entity_list->GetNPCList();
foreach $npcs(@npcList) {
## NPC ID you want to be all dead
if($npcs->GetNPCTypeID() == 999148) {
$counter = 1;
}
}
if($counter == 0) {
## NPCs to respawn
quest::spawn2(888888,0,0,1653.5,1537.6,-8.2,172.8);
}
quest::settimer("start", 6);
}
}
|

08-17-2010, 02:58 PM
|
Dragon
|
|
Join Date: May 2009
Location: Milky Way
Posts: 539
|
|
At some point, its better to use your own brain than rely on others for everything. You seem like a very lazy person.
The script is all about checking if there are no mobs of a certain type spawned in the zone, a monkey could tweak the code so it would then check if another mob is up, or send a signal to another mob to do the spawning, or set a different length on the timer, etc.
|

08-17-2010, 03:18 PM
|
Hill Giant
|
|
Join Date: Jul 2007
Posts: 111
|
|
Quote:
Originally Posted by Caryatis
At some point, its better to use your own brain than rely on others for everything. You seem like a very lazy person.
The script is all about checking if there are no mobs of a certain type spawned in the zone, a monkey could tweak the code so it would then check if another mob is up, or send a signal to another mob to do the spawning, or set a different length on the timer, etc.
|
not really lazy, just not experienced in all aspects of quests yet.
Kinda hard to change somthing to work when i dont know how to lol. To be quite honest i cannot see how the code does what it does. Ill just try to figure out a different way.
|
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:43 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |