Jump to content

[Suggestion] Script command to retrieve active quest info


n0tttt

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

As of now, there isn't a script command to retrieve the timer or the hunted amount of a given mob in a quest. There's only checkquest(<id>,PLAYTIME) or checkquest(<id>,HUNTING) which only retrieves if the timer has been reached, or if the amount has been hunted. It'd be useful to have a command which returns the sd->quest_log[id].time parameter or sd->quest_log.count[j]
This way there wouldn't be a need for variables like etower_timer, and this would be useful to retrieve this info instantly for multiple specified quests.
Here's what I propose:

*getquestinfo(<quest>,<type>{,<mob id>{,<char_id>})

Returns the quest information of the given character.

Valid info types:
 PLAYTIME: returns the internal timer of the quest.
 HUNTING: returns the amount of <mob id> already hunted.

Examples:

	mes "You've hunted "+getquestinfo(60301,HUNTING,1155)+" Petit.";

	.@timer = getquestinfo(60200,PLAYTIME);
	mes "You still have to wait "+Time2Str(.@wait)+" to enter Endless Tower again.";

 

And here's a little snippet to check instance timers easily, which would be one of the main uses of this type of command I think.

	setarray .@instance$[0],"Endless Tower","Sealed Catacomb";
	setarray .@quest_id[0],60200,3040;
	setarray .@status$[0],"Unavaiaible","990000","Avaiaible","009900";
	for(.@size = getarraysize(.@instance$);.@i < .@size;.@i++) {
		.@time$ = "";
		.@status = checkquest(.@quest_id[.@i],PLAYTIME);
		.@status = .@status == -1 || .@status == 2;
		if(.@status) {
			.@timer = getquestinfo(.@quest_id[.@i],PLAYTIME);
			.@time$ = Time2Str(.@timer);
		}
		dispbottom .@instance$[.@i]+": "+.@status$[.@status*2]+" "+.@time$+".","0x"+.@status$[.@status*2 + 1];
	}
	end;

 

Edited by n0tttt
  • Upvote 6
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...