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

06-26-2008, 12:16 AM
|
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
Quote:
Originally Posted by Neiv
Yay! That did it! It's now accepting only item 13732. Since that item is lore, the ">" operator becomes moot. (But why doesn't == work?)
Thanks for all the help. Next up; mob spawns triggered by the same turn-in. Going to try my hand at solo-ing the quest:spawn feature, but I may be back. Thanks again.
|
I belive its not the operator you thing it is.
rather than "greater or equal" it reads something like "fetch from item slot"
- basilcy its not an operator at all (from my logical understanding)
regading mob spawns. here is an easy sample for you to work with pulled from one of my quests
Code:
sub EVENT_ITEM
{
if(plugin::check_handin(\%itemcount, 1027 => 1))
{
quest::say("Now that you got back my magical tome, I have no more use for you. Sorry dear...");
#spawns 4 KOS mobs around you
my $x;
my $y;
my $z;
my $h;
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();
quest::spawn2(58012,0,0,$x+5,$y+5,$z,$h);
quest::spawn2(58012,0,0,$x-5,$y-5,$z,$h);
quest::spawn2(58012,0,0,$x+5,$y-5,$z,$h);
quest::spawn2(58012,0,0,$x-5,$y+5,$z,$h);
}
else
{
plugin::return_items(\%itemcount);
}
}
Enjoy =)
|
 |
|
 |

06-26-2008, 10:04 AM
|
|
Hill Giant
|
|
Join Date: May 2008
Location: Colorado
Posts: 238
|
|
Quote:
Originally Posted by ChaosSlayer
I belive its not the operator you thing it is.
rather than "greater or equal" it reads something like "fetch from item slot"
- basilcy its not an operator at all (from my logical understanding)
|
That's good to know. I just assumed it was a "greater than or equal to" operator, but could not figure out why the = comes before the >. That explains it.
Quote:
|
regading mob spawns. here is an easy sample for you to work with pulled from one of my quests
|
Very helpful. I will use this as a template. Thanks. What's the logic behind using quest::spawn2 rather than quest::spawn?
|

06-26-2008, 01:06 PM
|
|
Hill Giant
|
|
Join Date: May 2008
Location: Colorado
Posts: 238
|
|
Chaos, I modified your spawn script and everything works great. I now have the first part of a larger npc war script finished. Just seeing all those guards spawn to reinforce the kingdom when I turned in the item to the king brought a tear to my eye
Thanks again for all the help!
|

06-26-2008, 02:45 PM
|
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
Quote:
Originally Posted by Neiv
Chaos, I modified your spawn script and everything works great. I now have the first part of a larger npc war script finished. Just seeing all those guards spawn to reinforce the kingdom when I turned in the item to the king brought a tear to my eye
Thanks again for all the help!
|
np
.
|
 |
|
 |

06-26-2008, 07:08 PM
|
|
Hill Giant
|
|
Join Date: May 2008
Location: Colorado
Posts: 238
|
|
Okay, one thing I didn't expect was for the newly spawned mobs to disappear when I log off. If I want them to remain spawned until they are killed by a player raid or an npc war, is there a way to do that? The goal of the npc spawn is to provide reinforcements against members of another faction coming in and taking over the city in an attempt to retake the item I just turned in to the king. If they despawn when I log from my account, then the quest is functionally useless to my storyline. I want to make it so that they remain there to guard the realm against players of a different faction who are looking for the item I just turned into the king. If another faction does come in, kills all the npcs (except for the king), loots a specified item from one of the named npcs, and turns it into to the king, the king then yields the item they came for (via another turn-in), and all his reinforcements despawn, never to spawn again until and unless someone else turns in the same item to him.
How do I make the spawns stay put? Would that be a quest::spawn rather than a quest::spawn2? Something else? Also, once I have them there, I want to have the second item turn-in trigger their despawn. Any ideas on this?
|
 |
|
 |

06-26-2008, 07:13 PM
|
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
the server has no way to store any data about something what is not a part of default spawn DB
you may want to turn on the Persistant State rule in Variables section of the DB. but no garantee that server will record and reproduce CURRENT state for mosb that are not part of DB spawns
basicly if you looking for soemthing like a GM event where mobs become persistant, you want to actualy add them to regular spawn tables and turn then on and off as requred.
of course it would have to be done by hand, cuase there no conection betwen quest scripts and DB
NOTE: once Persistant State has been turned on ANY changes you do Db will auto crash the server untill Persistant State turned off.
As far as despawning goes, there is a comand quest::depop
basicly once item turned in to quest NPC, npc will need to send a SIGNAL code command to each npc you want to dispawn, and each of those npcs will execute depop comand
|

06-27-2008, 10:48 AM
|
|
Hill Giant
|
|
Join Date: May 2008
Location: Colorado
Posts: 238
|
|
Quote:
Originally Posted by ChaosSlayer
you may want to turn on the Persistant State rule in Variables section of the DB. but no garantee that server will record and reproduce CURRENT state for mosb that are not part of DB spawns
|
Actually, this works very well. I turned persistent state on, did the quest, did a #zsave (not sure if that matters, but I did it anyway), logged out, shut down world, came back in and the mobs were still there.
Quote:
|
As far as despawning goes, there is a comand quest::depop. basicly once item turned in to quest NPC, npc will need to send a SIGNAL code command to each npc you want to dispawn, and each of those npcs will execute depop comand
|
Thanks; I'll give this a try.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
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.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |