Here's how i do my quest scripts and an example xD
quest_db
// Quest Database
//
// Structure of Database:
// Quest ID,Time Limit,Target1,Val1,Target2,Val2,Target3,Val3,Quest Title
81000,0,1002,10,0,0,0,0,"Hunting Porings";
(This will give a small notification each time you kill a poring xD to know how many you've killed so far. (Not sure if it works for all client, i'm using 2012-04-10))
NPC side
-Usual header-
if (checkquest (81000,HUNTING) == 2) {
mes "[ToiletMaster]";
mes "You've done it! Congratulations!";
mes "Here's a great reward for you!";
next;
mes "[ToiletMaster]";
mes "Just Kidding! :D";
close; }
mes "[ToiletMaster]";
mes "I want you to kill 10 PORINGS!
setquest 80010;
close;