Custom 1 time NPC
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. |
Quote:
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 >.< |
Im weary on Qglobals bc I have yet to get it functioning with MaxCharLevel. I guess I could resort to a "flag" that would do it.
And thanks for the reply! |
I have an idea, I'm going to put my server up really fast, write the code, and get back to you when I have it working or if I can't get it working.
|
Thanks King! :-)
|
Quote:
Code:
sub EVENT_SAY{ He sets it once and when the value of the qglobal has been subtracted to 0, he no longer will make a sammich :D |
haha thanks Akk I will now test out this here sammich maker!
|
Quote:
I would say: Code:
sub EVENT_SAY{ |
H you were correct, only issue im having is that 1 person can bang out all 10 hails.
|
Quote:
To limit 1 per person, you have to add additional checking. In this case I would create a character scoped (Type 5) qglobal to keep folks from being able to hail more than once from their character: Code:
sub EVENT_SAY{ |
I wasnt complaining at all Akk I appreciate everyones help and this is working perfectly! Thank you everyone I have soo many uses for this now with the reroll :-)
|
Here, Entity Variables work just as well, make sure to set the NPC's qglobal to 1!
EDIT: Entity Variables reset upon #repop of the NPC. Code:
sub EVENT_SAY |
Entity Variables don't persist beyond repop or zone, have to use something more persistent.
|
Quote:
EDIT: He could just set the NPC's respawn time to like 30 days or something so he could have time to delete it after the event ends. |
All times are GMT -4. The time now is 07:16 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.