View Single Post
  #3  
Old 11-01-2011, 06:02 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

I've got a SQL stored procedure that takes the PCs level, and then randomly chooses a NPC_ID from the spawn_entry table near the PCs level so a quest can be assigned to kill this random creature. Well, what I need is a way of determining when the PC actually kills this randomly assigned MOB so that when they return I can reward them. (I can put the npc_type id in a qglobal, but I still have no way of knowing when or whether they killed the monster.) So I know the task system can identify when a MOB dies, so as a part of getting the quest I used SQL to dynamically create a new task (with all the appropriate activities etc.) that can be assigned to the PC (it is actually another stored procedure but that is irrelevant). Problem is that the running server does not recognize the newly created task...unless/until I use the gm command #task reloadall; then the Perl code can just do a #quest::assigntask(@taskID[0]); and it works just fine.

So I need to either:
A) Somehow track a kill--sorta like the task system does--when the PC kills a randomly assigned MOB somehow flag that
OR
B) Once the task is dynamically created with the sproc, do a GM "#task reloadall" in the Perl script so that I can just quest::assigntask the task
Reply With Quote