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:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ethy's
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #13
RE: ethy's
You will need to store a tag on the eth item setting to it the serv time when created, transfer it to the mount when mounting and transfering it back to the item when dismounting.

The tag would store the <serv.time>, which uses tenths of second to handle the time, hence you will have to convert them to seconds to use the timerf functions.
Timerf gets destroyed when the item is deleted, and this happens each time you mount/dismount for both eth item and the mounted npc, so I would add a function and call it when the mount NPC is being dismounted:

Code:
[function f_eth_timeout]
//argn raw timer
if (<argn>==0) // no previous timer
tag.timeout = <eval 60*60*24*30>
else
tag.timeout = <argn1>
endif
if (<tag.timeout> < <serv.time>)
remove
return 1
endif
timerf remove,<eval <tag.timeout>/10>

Then you must call the function on the newly created item or npc (after serv.newitem=xx or serv.newnpc=xx) with this line: new.f_eth_timeout <tag0.timeout>
05-28-2016 06:06 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
ethy's - dabritmusic - 02-06-2014, 08:58 AM
RE: ethy's - XuN - 02-06-2014, 09:00 AM
RE: ethy's - dabritmusic - 02-07-2014, 07:35 AM
RE: ethy's - Alaric - 02-06-2014, 07:45 PM
RE: ethy's - Shidhun - 02-07-2014, 12:15 AM
RE: ethy's - Mordaunt - 02-07-2014, 10:17 AM
RE: ethy's - Pidrila - 02-07-2014, 04:33 PM
RE: ethy's - XuN - 02-07-2014, 07:47 PM
RE: ethy's - miltonvo - 05-24-2016, 03:38 AM
RE: ethy's - Criminal - 05-24-2016, 05:54 AM
RE: ethy's - dabritmusic - 02-09-2014, 05:32 PM
RE: ethy's - Vaikin - 05-24-2016, 06:09 AM
RE: ethy's - XuN - 05-28-2016 06:06 PM
RE: ethy's - miltonvo - 06-03-2016, 06:01 AM

Forum Jump:


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