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
 ![]()  
		
	 | 
	
		
			
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   ? On=@login? or something else?
 
Thanks!
 
Lazarus.
			  
			
			
 
			
		 |  
	 
 | 
	| 10-24-2012 01:30 PM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		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-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= 
endif
  
			 
			
			
 
			
				
(This post was last modified: 10-25-2012 02:12 AM by Lazarus.)
 
				
			 
		 |  
	 
 | 
	| 10-25-2012 02:03 AM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		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 | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	 
	
	
		
	
	
		
 
	 
	
	
	
	
	
	
	
		
		
	
	
	
User(s) browsing this thread: 1 Guest(s)