Jump to content
  • 0

Questprogress script command


vomaito

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   3
  • Joined:  06/29/15
  • Last Seen:  

I wanna know if somebody can give his src mod for get quest progress command from Herc (for instances).

And also I wanna know the main difference between rA & Herc instances system

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   3
  • Joined:  06/29/15
  • Last Seen:  

I know, but return types are incompatible, i wanna know if someone has the patch for use both (rA instances or herc instances) without re-script herc instances.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

/**
 * questprogress(<ID>{,PLAYTIME|HUNTING{,<char_id>}})
 **/

BUILDIN_DEF(questprogress, "i??"),
BUILDIN_FUNC(questprogress)
{
    struct map_session_data *sd;
    enum quest_check_type type = HAVEQUEST;
    int ret;


    if( script_hasdata(st, 3) )
        type = (enum quest_check_type)script_getnum(st, 3);

    if (!script_charid2sd(4,sd))
        return SCRIPT_CMD_FAILURE;

    ret = quest_check(sd, script_getnum(st, 2), type));
    if (ret == 0) ret = 1;
    if (ret == -1) ret = 0;
    script_pushint(st, ret);

    return SCRIPT_CMD_SUCCESS;
}

haven't tested it but it should work

Edited by Nitrous
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   3
  • Joined:  06/29/15
  • Last Seen:  

Thanks I think need also include the header in script.c or script.h

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  4
  • Reputation:   1
  • Joined:  04/10/12
  • Last Seen:  

Would be way simpler to just use checkquest.

 

Herc:

0 = Quest not started (not in quest log)
1 = Quest has been given
2 = Quest completed
 
rAthena:
-1 = Quest not started (not in quest log)

 0 = Quest has been given, but the state is "inactive"
 1 = Quest has been given, and the state is "active"
 2 = Quest completed

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Yeah but he said he didn't want to change the scripts, just make a new questprogress command that mimics herc's command.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   3
  • Joined:  06/29/15
  • Last Seen:  

No problem, i change questprogress for checkquest. was easier.

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
Answer this question...

×   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...