10-24-2012, 12:48 PM
Pages: 1 2
10-24-2012, 01:12 PM
serv.account.tag.blah
to remove it after a day? either use a timer function or make the tag a time stamp based on serv.time run a check when players log in
Assuming I am correctly understanding what you are wanting.
to remove it after a day? either use a timer function or make the tag a time stamp based on serv.time run a check when players log in
Code:
IF (<eval <SERV.TIME>-<serv.account.tag0.blah>/10> > 86400)
serv.account.tag.blah=
endifAssuming I am correctly understanding what you are wanting.
10-24-2012, 01:30 PM
(10-24-2012 01:12 PM)Mordaunt Wrote: [ -> ]serv.account.tag.blah
to remove it after a day? either use a timer function or make the tag a time stamp based on serv.time run a check when players log in
Code:
IF (<eval <SERV.TIME>-<serv.account.tag0.blah>/10> > 86400)
serv.account.tag.blah=
endif
Assuming I am correctly understanding what you are wanting.
Yo can explain that /10 > 86400?
and, where i put that
? On=@login? or something else?Thanks!
Lazarus.
10-24-2012, 05:18 PM
Or put a item on player with timer 

Code:
[ITEMDEF i_timer_tag_blah]
NAME=[Blah Account Tag Timer]
ID=014f1
TYPE=T_EQ_Script
WEIGHT=0
LAYER=Layer_Special
ON=@CREATE
ATTR=ATTR_Invis|ATTR_Decay
ON=@EQUIP
TIMER=86400
CONT.ACCOUNT.TAG.BLAH=1
ON=@TIMER
CONT.ACCOUNT.TAG.BLAH=
CONT.SYSMESSAGE @0481 Bye tag!
REMOVE
ON=@DESTROY
CONT.ACCOUNT.TAG.BLAH=10-24-2012, 09:56 PM
Equipped timers don't tick while a player is logged off....
Also the timer would be only on the player who performed the action, and not any Alts...
86400 = seconds in a day.
Serv.time /10 gives you a time in seconds.
By placing the code I gave you under a @login trigger it will check if the difference between current serv.time and the time-stamped tag is > 86400 (24 hrs) and if so remove it.
In your voting script, have it check for that tag and run the same piece of code to see if the difference is over 24 hours, if it is, remove the tag and allow voting to occur, (and add the tag again with the new serv.time) if not prevent it. You could also have it output the remaining time so player know how ling until they can vote. Just remember it's in seconds so you'll have to do a little math with it (/60) to get a number players can more easily understand.
Also the timer would be only on the player who performed the action, and not any Alts...
86400 = seconds in a day.
Serv.time /10 gives you a time in seconds.
By placing the code I gave you under a @login trigger it will check if the difference between current serv.time and the time-stamped tag is > 86400 (24 hrs) and if so remove it.
In your voting script, have it check for that tag and run the same piece of code to see if the difference is over 24 hours, if it is, remove the tag and allow voting to occur, (and add the tag again with the new serv.time) if not prevent it. You could also have it output the remaining time so player know how ling until they can vote. Just remember it's in seconds so you'll have to do a little math with it (/60) to get a number players can more easily understand.
10-25-2012, 02:03 AM
(10-24-2012 09:56 PM)Mordaunt Wrote: [ -> ]Equipped timers don't tick while a player is logged off....
Also the timer would be only on the player who performed the action, and not any Alts...
86400 = seconds in a day.
Serv.time /10 gives you a time in seconds.
By placing the code I gave you under a @login trigger it will check if the difference between current serv.time and the time-stamped tag is > 86400 (24 hrs) and if so remove it.
In your voting script, have it check for that tag and run the same piece of code to see if the difference is over 24 hours, if it is, remove the tag and allow voting to occur, (and add the tag again with the new serv.time) if not prevent it. You could also have it output the remaining time so player know how ling until they can vote. Just remember it's in seconds so you'll have to do a little math with it (/60) to get a number players can more easily understand.
Thanks!
I will try it!
and the /60 to see the exact number yes
I have take it that from another script ^_^Thanks again

I had errors. I had trying this:
Code:
[this in the dialog] serv.account.tag0.blah=<serv.time>
[FUNCTION vote]
IF (!<SRC.account.tag0.blah>)
IF <eval <src.findid.account.tag0.blah.timer>/3600>>
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=
endif10-25-2012, 03:13 AM
Your code:
Untested but that should do it.
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=
endifCode:
[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=
endifUntested but that should do it.
10-25-2012, 11:07 AM
(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)> minutesworks bad

The counter keeps going up and not down xD

Any idea
?10-25-2012, 11:52 AM
Code:
[FUNCTION vote]
IF (<ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>==0) || (<ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed> < <SERV.TIME>)
SAY I can vote now, and I vote for RanXerox!
ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed=<EVAL <SERV.TIME>+86000>
MESSAGE You lazy bastard, you could have voted <EVAL <SERV.TIME>-<ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>> seconds ago... but you didn't!
GM=0
INVUL=0
HITS=0
ELSE
MESSAGE You are not allowed to vote for another <EVAL <ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>-<SERV.TIME>> seconds!
EMOTE die for trying to vote again before it is allowed!
GM=0
INVUL=0
HITS=0
ENDIF10-25-2012, 01:06 PM
THANKS!!!!!!!!!!!!!!!!!!!! I LOVE YOU GUYS 
this is for hours, for noobs need
like me 
MESSAGE You are not allowed to vote for another <eval <EVAL <ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>-<SERV.TIME>> /3600> hours!

this is for hours, for noobs need
like me 
MESSAGE You are not allowed to vote for another <eval <EVAL <ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>-<SERV.TIME>> /3600> hours!
Pages: 1 2