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-nmm6 (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-nmm6 (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-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with diconnect timer
Author Message
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #1
Problem with diconnect timer
hi i have a vet/afk system. basically sends out a message to all clients every 15 minutes. they have to type .continue xxxx in order to keep playing. otherwise they are disconnected. they are rewarded with a vet point if they comply. i use this because i have a time reward system and i don't want players going afk to reap the benefits... how do i make it a random number on the .continue. i don't want them to be able to macro it. also the disconnect isn't working correctly. any suggestions? thanks... im slowly getting the hang of things! sorry for all the questions. i haven't dabbled with sphere for over 6 years, appreciate all the feedback my posts get!

[ITEMDEF i_verification_obj]
ID=i_crystal_ball
NAME=Verification Object [DO NOT REMOVE]
WEIGHT=5000 // Just to make sure...
TYPE=t_script

ON=@Create
ATTR=attr_decay

ON=@DClick
IF (<SRC.ISGM>)
SRC.SYSMESSAGE Initialized.
TIMER=60*15 // Fifteen minutes
ENDIF
RETURN 1

ON=@Timer
SERV.ALLCLIENTS f_verification
TIMER=60*15 // Activate timer once again.
RETURN 1


[ITEMDEF i_disconnect_obj]
ID=i_memory
NAME=Disconnect Object
WEIGHT=0
TYPE=t_eq_script

ON=@Create
ATTR=attr_invis|attr_decay

ON=@Timer
CONT.DISCONNECT
REMOVE
RETURN 1

[FUNCTION f_verification]
LOCAL.CODE += <EVAL (<UID> / <FINDLAYER(21).COUNT>) 3>
SERV.NEWITEM=i_disconnect_obj
NEW.CONT=<UID>
NEW.MORE1=<LOCAL.CODE>
NEW.TIMER=60*3 // Three minutes.
MESSAGE @077a Please type .Continue <dLOCAL.CODE> to continue playing.

[PLEVEL 1]
Continue

[FUNCTION Continue]
IF (<FINDID(i_disconnect_obj).UID>)
IF !STRCMPI(<ARGS>,Code)
SYSMESSAGE @077a Current verification code is: <dFINDID(i_disconnect_obj).MORE1>.
RETURN 1
ENDIF
IF (<ARGS>==<FINDID(i_disconnect_obj).MORE1>)
SYSMESSAGE @077a You may continue playing.
FINDID(i_disconnect_obj).REMOVE
SYSMESSAGE @077a Incorrect. You will be disconnected in <dFINDID(i_disconnect_obj).TIMER> seconds.
ENDIF
tag0.vp= (<tag0.vp> +1 )
sysmessage @0481 You have earned a veteran reward point, you now have : <eval <tag0.vp>>!
ENDIF
ELSE
SYSMESSAGE @077a No verification code currently active.
ENDIF

[EOF]
02-12-2014 08:24 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Problem with diconnect timer - dabritmusic - 02-12-2014 08:24 AM
RE: Problem with diconnect timer - Alaric - 02-12-2014, 09:02 AM
RE: Problem with diconnect timer - Shidhun - 02-12-2014, 07:58 PM

Forum Jump:


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