The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quest repeat
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #15
RE: Quest repeat
(10-05-2012 08:55 PM)Gil Amarth Wrote:  
(08-13-2012 11:22 AM)Extreme Wrote:  Or you can store the Number ID of all completed quests in only one tag.
And check if the Number ID is in the tag to avoid repeat it.

When complete:
Code:
TAG.COMPLETEDQUESTS .= ",<QUESTNUMBER>"
To check if the quest is already completed:
Code:
[FUNCTION F_QUESTS_CHECKCOMPLETE]
LOCAL.QUESTNUMBER <ARGS>
ARGS <TAG.COMPLETEDQUESTS>
FOR 0 <EVAL <ARGV>-1>
IF STRMATCH(<LOCAL.QUESTNUMBER>,<ARGV[<LOCAL._FOR>]>)
  RETURN 1
ENDIF
ENDFOR
RETURN 0
Usage F_QUESTS_CHECKCOMPLETE <QUESTNUMBER>

I´m updating my scripts with this system.

What is the best method to repeat a completed quest?
How do you extract a single <LOCAL.QUESTNUMBER> from all TAG.COMPLETEDQUESTS string?
<GETARGVX X,<TAG.COMPLETEDQUESTS>>
Where x is the position.

PHP Code:
[FUNCTION GETARGVX]
IF <
ARGV[0]> == -1
 
RETURN <EVAL <ARGV>-1>
ELSE
 RETURN <
ARGV[<ARGV[0]>]>
ENDIF 

To get the position :
PHP Code:
[FUNCTION GETARGVPOS]
FOR 
P 1 <EVAL <ARGV>-1>
 IF 
STRMATCH(<ARGV[0]>,<ARGV[<dLOCAL.P>]>)
  RETURN <
dLOCAL.P>
 ENDIF
ENDFOR
RETURN -

<GETARGVPOS <STRINGTOSEARCH>,<STRING>>

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
10-05-2012 10:19 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Quest repeat - WRWR - 08-13-2012, 03:40 AM
RE: Quest repeat - Shaklaban - 08-13-2012, 04:04 AM
RE: Quest repeat - WRWR - 08-13-2012, 04:06 AM
RE: Quest repeat - Anarch Cassius - 08-13-2012, 05:11 AM
RE: Quest repeat - WRWR - 08-13-2012, 05:30 AM
RE: Quest repeat - Wap - 08-13-2012, 05:31 AM
RE: Quest repeat - Extreme - 08-13-2012, 11:22 AM
RE: Quest repeat - Gil Amarth - 10-05-2012, 08:55 PM
RE: Quest repeat - Extreme - 10-05-2012 10:19 PM
RE: Quest repeat - WRWR - 08-14-2012, 05:40 AM
RE: Quest repeat - Anarch Cassius - 08-14-2012, 07:13 AM
RE: Quest repeat - Extreme - 08-14-2012, 08:32 AM
RE: Quest repeat - WRWR - 08-14-2012, 11:35 AM
RE: Quest repeat - Extreme - 08-14-2012, 11:49 AM
RE: Quest repeat - Wap - 08-14-2012, 01:47 PM
RE: Quest repeat - Mordaunt - 10-06-2012, 12:19 AM
RE: Quest repeat - Gil Amarth - 10-06-2012, 02:47 AM
RE: Quest repeat - Extreme - 10-06-2012, 03:03 AM
RE: Quest repeat - Avatar - 10-06-2012, 05:57 AM
RE: Quest repeat - Extreme - 10-06-2012, 06:03 AM
RE: Quest repeat - Avatar - 10-06-2012, 06:04 AM
RE: Quest repeat - Extreme - 10-06-2012, 06:22 AM
RE: Quest repeat - Shaklaban - 10-06-2012, 07:43 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)