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
TIMERF?
Author Message
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #1
TIMERF?
How can I use the functions:

ISTIMERF.function
&
TIMERF STOP, function

?

I set 1 timerf on char, but this functions isn't work, but TIMERF CLEAR work well! Maybe because i'm set 1 timerf on char? And i'm need sets many anothers TIMERF functions? Thanks!
(This post was last modified: 05-18-2016 11:55 AM by Llirik.)
05-18-2016 11:51 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #2
RE: TIMERF?
ISTIMERF.<my_func>
TIMERF STOP, <my_func>
?

I'm use the Sphere 0.56b or 0.56b don't work?
(This post was last modified: 05-18-2016 02:08 PM by Llirik.)
05-18-2016 02:04 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: TIMERF?
Code:
[FUNTION SayLOL]
SAY lol

TIMERF 5,SayLOL <- run the function SayLOL on the char/item after 5 seconds
ISTIMERF.SayLOL <- check if there's any SayLOL timerf running on this char/item
TIMERF STOP,SayLOL <- stop only SayLOL timerf running on this char/item
TIMERF CLEAR <- stop all timerf running on this char/item
05-18-2016 02:17 PM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #4
RE: TIMERF?
[FUNCTION legend_jail]
targetf f_legend_jail

[FUNCTION f_legend_jail]
if !<argo.isplayer>
src.sysmessage Isn't player!
return 1
endif
if <argo.account.jail> // ISTIMERF.f_legend_jail_timer?
src.sysmessage [jailed]
else
argo.events +e_legendjail
argo.jail
argo.tag0.bail=1
argo.tag0.bailcost=100000
argo.tag0.jailtime=120 // 24 hours
argo.timerf 1, f_legend_jail_timer
endif

[FUNCTION f_legend_jail_timer]
if (<tag0.jailtime> <= 0)
dialogclose d_pay_bail
events -e_legendjail
kills=0
forgive
go Britain
tag0.bail=0
tag0.bailcost=0
update
return 1 // TIMERF STOP,f_legend_jail_timer?
endif
if <isonline>
tag0.jailtime -= 1
endif

serv.log <eval <tag0.jailtime>> TEST

timerf 1, f_legend_jail_timer


[FUNCTION legend_forgive]
targetf f_legend_forgive

[FUNCTION f_legend_forgive]
argo.tag0.jailtime=0



[EVENTS e_legendjail]
ON=@ClientToolTip
LOCAL.JHOURS=<eval (<i.tag0.jailtime>/3600)>
LOCAL.JMINS=<eval ((<i.tag0.jailtime>/60)-(<LOCAL.JHOURS>*60))>
LOCAL.JSECS=<eval (((<i.tag0.jailtime>-(<LOCAL.JHOURS>*3600))-(<LOCAL.JMINS>*60))>
SRC.ADDCLILOC 1042971,[Jailed; <eval <LOCAL.JHOURS>>:<eval <LOCAL.JMINS>>:<eval <LOCAL.JSECS>> remaining]




[ITEMDEF i_bail_stone]
ID=i_grave_stone
NAME=bail stone
TYPE=t_normal

ON=@CREATE
COLOR=0455

ON=@DCLICK
IF (<SRC.TAG0.BAIL>==1)
SDIALOG d_pay_bail
ENDIF
RETURN 1

[DIALOG d_pay_bail]
0,0
noclose
resizepic 0 0 2620 230 100
dtext 15 5 50 Штраф: <EVAL <SRC.TAG0.BAILCOST>>
dtext 15 25 480 Хотите ли вы платить его?
dtext 140 60 480 Да
dtext 60 60 480 Нет
button 25 60 4005 4006 1 0 0
button 100 60 4005 4006 1 0 1

[DIALOG d_pay_bail BUTTON]
ON=0
RETURN 1

ON=1
if !<SRC.TAG0.BAIL>
src.sysmessage @025,,1 Не читери!
return 1
endif
IF (<SRC.GOLD> >= <EVAL <SRC.TAG0.BAILCOST>>)
SRC.GOLD -= <EVAL <SRC.TAG0.BAILCOST>>
SRC.UPDATE
src.tag0.jailtime=0
ELSE
src.sysmessage @025,,1 Вам не хватает золота!
ENDIF

This right?

I'm use return 1 for break timerf!

timerf STOP,f_legend_jail_timer

07:33:ERROR:(jail.scp,30)Undefined symbol 'STOP'
(This post was last modified: 05-18-2016 02:34 PM by Llirik.)
05-18-2016 02:22 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #5
RE: TIMERF?
You probably don't have a sphere version with those functions's update.

You may as well want to store the timer into a memory item and not attach it to a tag.
(This post was last modified: 05-19-2016 05:50 AM by pointhz.)
05-19-2016 05:50 AM
Find all posts by this user Like Post Quote this message in a reply
Llirik
Journeyman
*

Posts: 115
Likes Given: 0
Likes Received: 10 in 8 posts
Joined: Feb 2015
Reputation: 0

UO Forum

Post: #6
RE: TIMERF?
Thank you! May I break function with return 1 well?
05-19-2016 02:54 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #7
RE: TIMERF?
Ye you may, since the return 1 is inside the function you want to break.
05-20-2016 05:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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