Lazarus 
Master
 
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
![]()
|
RE: Vote system tag account?
(10-25-2012 03:13 AM)Mordaunt Wrote: Your code:
Code:
[FUNCTION vote]
IF (!<SRC.account.tag0.blah>) // <--- if no tag
IF <eval <src.findid.account.tag0.blah.timer>/3600>> // <-- evaluate the tag thats not there??
SRC.SYSMESSAGE @,3,1 You have had voted. You left <eval <src.findid.i_mem_vote.timer>/3600> hours to try again.
ENDIF
and this in the player event:
IF (<eval <SERV.TIME>-<serv.account.tag0.blah>/10> > 86400)
serv.account.tag.blah=
endif
Code:
[FUNCTION vote]
IF (<account.tag0.blah>)
src.sysmessage @,3,1 You have already voted.
src.sysmessage @,3,1 You can vote again in <eval ((<serv.time>-<src.account.tag0.blah>/10)/60)> minutes
return 1
else
src.account.tag0.blah = <serv.time> // rewrite the tag to current time
//vote script
endif
ON=@LOGIN
IF (<eval <serv.time>-<src.account.tag0.blah>/10> > 86400)
src.account.tag0.blah=
endif
Untested but that should do it.
Thanks!
The problem here now it is, that counter
Code:
src.sysmessage @,3,1 You can vote again in <eval ((<serv.time>-<src.account.tag0.blah>/10)/60)> minutes
works bad 
The counter keeps going up and not down xD
Any idea  ?
|
|
10-25-2012 11:07 AM |
|
|