View Single Post
  #2  
Old 10-31-2013, 09:33 PM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default

Quote:
Originally Posted by Maceblade View Post
This may be an odd request, but I was looking at creating an NPC that hands out a reward to the first 10 hails and then depops forever, however I have no idea how to write it.

The only way I know how to do it is to create 10 seperate npc id's all controlled by triggers, when #1 is hailed it depops and spawns #2 etc and once #10 is hailed he depops forever. The only issue is I have no way to keep one person from doing multiple hails unless I can have it check for the item in inventory first.

I guess I was just looking to see if someone had an easier way to do this.
I would say, create 1 npc. and use QGlobals to keep count of how many items he has handed out. right after he hands out his 10th item you depop him. I believe there is spawn tools in the quest perl. Though I don't know them or their syntax off the top of my head.

And, I would use an inventory check to make sure the person doesn't already have the item. I'm using QGlobals for a quest to hand out an armor package and it's a mess, I have a QGlobal for every PC that got an armor package on my server >.<
Reply With Quote