Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Nov 29, 2005 8:10 pm   

TMC/TMS vote reminders.
 
By demand here is an example of one that should work.

This script causes a button to appear which reminds users to vote for TMS and TMC listings. It reminds the user of the rules and regulations of the mud voting sites.

Alias vote: checks the time to last vote and then spawns urls for the user to click.

Alias vote_manual: asks the user if (s)he wishes to vote.

Alarm -30:00: checks the status of the last vote and enables buttons which call the alias vote.

==============================

Change the referer URLs in the #URL paths is required. Currently set for Legends of the Jedi (lotj.wolfpaw.net:5000).

#CLASS {Vote}
#ALIAS vote {#T- TMCButton;#T- TMSButton;#ECHO %char( 32);#ECHO %ansi( white, red, bold)TMS TMC Voting Readme;#IF (!%defined( Vote_Continue)) {#VAR Vote_Continue n n "Vote|Admin"};#IF (!%defined( Vote_TMCLastVote)) {#VAR Vote_TMCLastVote {} _nodef "Vote|Admin"};#IF (%time( dd) != %copy( @Vote_TMCLastVote, 7, 2)) {#ECHO TMC user is allowed to cast a single vote for a specific mud once per day in each of the 3 categories (telnet, homepage clicks and the vote button). That is, you may vote 3 times total (one for each category) per day per mud.;#URL "http://www.mudconnect.com/mud-bin/vote_rank.cgi?mud=Legends+of+the+Jedi";#URL "http://www.mudconnect.com/mud-bin/redirect.cgi?mud=Legends+of+the+Jedi&url=http://lotj.wolfpaw.net";#URL http://www.mudconnect.com/mud-bin/telnet.cgi?mud=Legends+of+the+Jedi&url=telnet://lotj.wolfpaw.net:5000;#VAR Vote_TMCLastVote %time( yyyymmddhhmm)} {#ECHO TMC - Can't vote till %eval( %time( dd)+1) %time( mmmm)};#IF (%eval( ((%time( dd)-%copy( @Vote_TMSLastVote, 7, 2))*24+(%time( hh)-%copy( @Vote_TMSLastVote, 9, 2)))) > 12) {#IF (!%defined( Vote_TMSLastVote)) {#VAR Vote_TMSLastVote {} _nodef "Vote|Admin"};#ECHO TMS rules - Your vote will count only once every 12 hours.;#URL "http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=oriondg";#VAR Vote_TMSLastVote %time( yyyymmddhhmm)} {#ECHO TMS - Can't vote till %if( %eval( %time( hh)+12)>=24, %concat( %replace( %format( "&2.0f", %eval( %time( hh)+12-24)), " ", 0), ":00 ", %eval( %time( dd)+1), " ", %time( mmmm)), %concat( %eval( %time( hh)+12), ":00 ", %time( dd mmmm)))};#ECHO %ansi( white, red, bold)TMS TMC Voting End Readme}
#ALIAS vote_manual {#IF (!%defined( Vote_Continue)) {#VAR Vote_Continue n n "Vote|Admin"};#IF (!%defined( Vote_TMCLastVote)) {#VAR Vote_TMCLastVote {} _nodef "Vote|Admin"};#ECHO TMC user is allowed to cast a single vote for a specific mud once per day in each of the 3 categories (telnet, homepage clicks and the vote button). That is, you may vote 3 times total (one for each category) per day per mud.;#VAR Vote_Continue %upper( %prompt( n, %concat( "TMC = If it is not the same day as ", @Vote_TMCLastVote , " then enter Y to vote")));#IF (@Vote_Continue == "Y") {#URL "http://www.mudconnect.com/mud-bin/vote_rank.cgi?mud=Legends+of+the+Jedi";#URL "http://www.mudconnect.com/mud-bin/redirect.cgi?mud=Legends+of+the+Jedi&url=http://lotj.wolfpaw.net";#URL http://www.mudconnect.com/mud-bin/telnet.cgi?mud=Legends+of+the+Jedi&url=telnet://lotj.wolfpaw.net:5000;#VAR Vote_TMCLastVote %time( yyyymmddhhmm)};#IF (!%defined( Vote_TMSLastVote)) {#VAR Vote_TMSLastVote {} _nodef "Vote|Admin"};#VAR Vote_Continue %upper( %prompt( n, %concat( "TMS = If it more than twelve hours since ", @Vote_TMSLastVote, " then enter Y to vote")));#IF (@Vote_Continue == "Y") {#ECHO TMS rules - Your vote will count only once every 12 hours.;#URL "http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=oriondg";#VAR Vote_TMSLastVote %time( yyyymmddhhmm)}}
#ALARM "TM_VoteAlarm" {-30:00} {#IF (%time( dd) != %copy( @Vote_TMCLastVote, 7, 2)) {#T+ TMCButton};#IF (%eval( ((%time( dd)-%copy( @Vote_TMSLastVote, 7, 2))*24+(%time( hh)-%copy( @Vote_TMSLastVote, 9, 2)))) > 12) {#T+ TMCButton}}
#BUTTON 88 {VOTE TMS} {vote} {} {} {} {} {} {} {} {} {} {} {} {76} {} {} {} "" {} {} {TMSButton}
#BUTTON 89 {VOTE TMC} {vote} {} {} {} {} {} {} {} {} {} {} {} {76} {} {} {} "" {} {} {TMCButton}
#CLASS 0
#CLASS {Vote|Admin}
#T- TMCButton
#T- TMSButton
#VAR Vote_Continue {n} {n}
#VAR Vote_TMCLastVote {200511252359}
#VAR Vote_TMSLastVote {200511250001}
#CLASS 0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net