Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script atcmd_quest_manage -1,{
- OnInit:
- bindatcmd "checkquest", strnpcinfo(3) + "::OnCheckQuest", 99;
- bindatcmd "setquest", strnpcinfo(3) + "::OnSetQuest", 99;
- bindatcmd "erasequest", strnpcinfo(3) + "::OnEraseQuest", 99;
- end;
- OnCheckQuest:
- .@quest_id = atoi(.@atcmd_parameters$[0]);
- dispbottom "checkquest("+.@quest_id+"):";
- switch (checkquest(.@quest_id)) {
- case -1: dispbottom "-1 = Quest not started (not in quest log)";
- case 0: dispbottom " 0 = Quest has been given, but the state is \"inactive\"";
- case 1: dispbottom " 1 = Quest has been given, and the state is \"active\"";
- case 2: dispbottom " 2 = Quest completed";
- }
- dispbottom "checkquest("+.@quest_id+", PLAYTIME):";
- switch (checkquest(.@quest_id, PLAYTIME)) {
- case -1: dispbottom "-1 = Quest not started (not in quest log)";
- case 0: dispbottom " 0 = the time limit has not yet been reached";
- case 1: dispbottom " 1 = the time limit has not been reached but the quest is marked as complete";
- case 2: dispbottom " 2 = the time limit has been reached";
- }
- dispbottom "checkquest("+.@quest_id+", HUNTING):";
- switch (checkquest(.@quest_id, HUNTING)) {
- case -1: dispbottom "-1 = Quest not started (not in quest log)";
- case 0: dispbottom " 0 = you haven't killed all of the target monsters and the time limit has not been reached.";
- case 1: dispbottom " 1 = you haven't killed all of the target monsters but the time limit has been reached.";
- case 2: dispbottom " 2 = you've killed all of the target monsters";
- }
- end;
- OnSetQuest:
- .@quest_id = atoi(.@atcmd_parameters$[0]);
- if (checkquest(.@quest_id) == -1) {
- setquest .@quest_id;
- dispbottom "setquest("+.@quest_id+") - quest assigned.";
- }
- else {
- dispbottom "setquest("+.@quest_id+") - failed, quest already assigned.";
- }
- end;
- OnEraseQuest:
- .@quest_id = atoi(.@atcmd_parameters$[0]);
- if (checkquest(.@quest_id) == -1) {
- dispbottom "erasequest("+.@quest_id+") - failed quest aren't assigned yet.";
- }
- else {
- erasequest .@quest_id;
- dispbottom "erasequest("+.@quest_id+") - quest erased.";
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement