Everything you need is in doc\script_commands.txt, though I admit it's hard searching for specific commands when you only have a description in mind.
Hunting quests can either be done through db\quest_db.txt or an NPC script. Since you want the monster kills to only count with an accessory equipped, you have to use a script:
OnNPCKillEvent: // this activates each time a monster is killed
if (quest_variable == value) { // check if player has the quest first (for efficiency)
if (killedrid == 1002 && isequipped(accessory_id)) { // additional checks
set kill_count_variable, kill_count_variable+1; // add kill to counter
if (kill_count_variable == 1000) // notify the player
dispbottom "You are done the quest.";
}
}
end;
You'll probably need to add/set other variables to check what part of the quest the player is on. As for the random questions, use a switch() statement:
switch(rand(20)) { // will output a number 0,1,2,3,...19
case 0:
set .@question$,"This is your first question!";
set .@answer$,"This is the first answer!";
break; // break out of the switch()
case 1: // etc.
//...
case 19: // etc.
}
mes .@question$;
input .@str$; // any variable, since these are temporary
if (.@str$ == .@answer$) {
mes "Correct!";
getitem item_id,amount;
close;
}
else {
mes "Incorrect.";
close;
}
To ask multiple questions, possibly use a for() loop and give the reward when the loop variable is 3.