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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vote system tag account?
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #1
Vote system tag account?
A vote system with tag account?

or only the way to put a tag in a account and take it out in 1 day?

Thanks!

[Image: 2hy9q0y.png]
10-24-2012 12:48 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Vote system tag account?
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.

[Image: 2nis46r.jpg]
10-24-2012 01:12 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #3
RE: Vote system tag account?
(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 Shock? On=@login? or something else?

Thanks!

Lazarus.

[Image: 2hy9q0y.png]
10-24-2012 01:30 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #4
RE: Vote system tag account?
Or put a item on player with timer Big Grin

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=

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
10-24-2012 05:18 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Vote system tag account?
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.

[Image: 2nis46r.jpg]
(This post was last modified: 10-24-2012 10:28 PM by Mordaunt.)
10-24-2012 09:56 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #6
RE: Vote system tag account?
(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 Tongue I have take it that from another script ^_^

Thanks again Smile


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=
endif

[Image: 2hy9q0y.png]
(This post was last modified: 10-25-2012 02:12 AM by Lazarus.)
10-25-2012 02:03 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: Vote system tag account?
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.

[Image: 2nis46r.jpg]
(This post was last modified: 10-25-2012 03:15 AM by Mordaunt.)
10-25-2012 03:13 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #8
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 Shock
The counter keeps going up and not down xD Smile

Any idea Tongue?

[Image: 2hy9q0y.png]
10-25-2012 11:07 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #9
RE: Vote system tag account?
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
ENDIF
(This post was last modified: 10-25-2012 12:17 PM by RanXerox.)
10-25-2012 11:52 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #10
RE: Vote system tag account?
THANKS!!!!!!!!!!!!!!!!!!!! I LOVE YOU GUYS Blush

this is for hours, for noobs need Shock like me Blush

MESSAGE You are not allowed to vote for another <eval <EVAL <ACCOUNT.TAG0.TimeThatAnotherVoteIsAllowed>-<SERV.TIME>> /3600> hours!

[Image: 2hy9q0y.png]
10-25-2012 01:06 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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