Well after a hard drive loss, i lost my vote script and dont remember how to add a remote script to this. Kinda need a refresher

I want to be able to add a on text command so that when it picks up !bot-Vote topic it will do a 60 sec vote on that topic. Been trying for a week and cant remember exactly how to do it.

on 1:START:{ set %voting.stations CLOSED }


alias votebox {
set %nooo 1
set %vote.chan $1
dialog -m votebox votebox
}

alias VOTE {
if ( %voting.stations != OPEN ) {
set %statusindex 53
set %makeSure 0
if ($did(votebox,32).state == 1) { set %myVote abs }
if ($did(votebox,33).state == 1) { set %myVote yes }
if ($did(votebox,34).state == 1) { set %myVote no }
if ($did(votebox,28).state == 1) { set %halfway 1 }
else { set %halfway 0 }
if ($did(votebox,29).state == 1) { set %usecommand 1 }
else { set %usecommand 0 }
set %vote.chan $did(votebox,20)
set %vote.question $did(votebox,22)
set %before $calc(%time / 2)
set %after $calc(%time / 2)
set %choice1 $did(votebox,26)
set %choice2 $did(votebox,35)
msg %vote.chan 7Vote Question:  %vote.question
msg %vote.chan 7Answer with %choice1 7and %choice2 7.
msg %vote.chan  %time 7seconds remain for registering your vote.
set %voting.stations OPEN
.timer6 1 %before halfway
set %voted.agree 0
set %voted.disagree 0
set %voted.people 0
if ( %myVote == yes ) {
inc %voted.agree
inc %voted.people
}
else if ( %myVote == no ) {
inc %voted.disagree
inc %voted.people
}
}
}

on *:TEXT:*seconds remain*vote*:{
set %notNow 1
.timer 1 $1 set %notNow 0
}

on 1:TEXT:%choice1:*:{
if (%voting.stations == OPEN) {
notice $nick You Voted: %choice1
.auser 2 $wildsite
inc %voted.people
inc %voted.agree
inc %statusindex
if ( %statusindex > 57 ) { set %statusindex 54 | did -r votebox 54,55,56,57 1 }
if ( %makeSure != 1 ) { did -o votebox %statusindex 1 $nick voted %choice1 | initialise }
}
else { notice $nick Stations Are Closed }
}

on 3:TEXT:*:*:{
if (%choice1 isin $1) {
notice $nick You Changed your vote to: %choice1
.auser 2 $wildsite
inc %voted.agree
dec %voted.disagree
inc %statusindex
if ( %statusindex > 57 ) { set %statusindex 54 | did -r votebox 54,55,56,57 1 }
if ( %makeSure != 1 ) { did -o votebox %statusindex 1 $nick voted %choice1 | initialise }
}
if (%choice2 isin $1) { notice $nick You've already voted! }
}

on 2:TEXT:*:*:{
if (%choice2 isin $1) {
notice $nick You Changed your vote to: %choice2
.auser 3 $wildsite
dec %voted.agree
inc %voted.disagree
set %nick $nick
inc %statusindex
if ( %statusindex > 57 ) { set %statusindex 54 | did -r votebox 54,55,56,57 1 }
if ( %makeSure != 1 ) { did -o votebox %statusindex 1 $nick voted %choice2 | initialise }
}
if (%choice1 isin $1) { notice $nick You've already voted! }
}

on 1:TEXT:%choice2:*:{
if (%voting.stations == OPEN) {
notice $nick You Voted: %choice2
.auser 3 $wildsite
inc %voted.disagree
inc %voted.people
inc %statusindex
if ( %statusindex > 57 ) { set %statusindex 54 | did -r votebox 54,55,56,57 1 }
if ( %makeSure != 1 ) { did -o votebox %statusindex 1 $nick voted %choice2 | initialise }
}
else { notice $nick Stations Are Closed }
}
alias halfway {
if ( %halfway == 1 ) {
msg %vote.chan 7Vote closes in %after seconds.
msg %vote.chan 7The Motion is: %vote.question
msg %vote.chan 4Votes %choice1 $+ : %voted.agree 7|| 12 Votes %choice2 $+ : %voted.disagree
}
.timer7 1 %after closed
}

alias closed {
.rlevel 1
.rlevel 2
.rlevel 3
set %voting.stations CLOSED
set %vote.perc.voted $calc((%voted.people / $nick(%vote.chan,0)) * 100)
set %voted.perc.agree $calc((%voted.agree / %voted.people) * 100)
set %voted.perc.disagree $calc((%voted.disagree / %voted.people) * 100)
msg %vote.chan 7The vote has closed, %vote.perc.voted $+ % of %vote.chan voted.
msg %vote.chan 4Total %choice1 $+ : %voted.agree $+ , %voted.perc.agree $+ % || 12Total %choice2 $+ : %voted.disagree $+ , %voted.perc.disagree $+ %
results
}

alias results {
if (%voted.agree > %voted.disagree) {
msg %vote.chan 4The consensus was %choice1 on  %vote.question
if (%usecommand = 1) {
%vote.question
}
}

if (%voted.agree < %voted.disagree) {
msg %vote.chan 4The consensus was %choice2 on  %vote.question
}

if (%voted.agree == %voted.disagree) {
msg %vote.chan 7The consensus was equal on  %vote.question
}
}

dialog votebox {
title "Vote"
size -1 -1 217 137
option dbu
tab "Votebox",202,3 5 213 115
text "Use this section to call a vote in a channel.",17,10 22 200 11,tab 202

box "Vote Properties",19,8 32 162 80,tab 202

edit %vote.chan,20,88 40 65 10,tab 202
text "Vote channel",21,15 41 70 10,tab 202 autohs

edit "Am I leet?",22,88 50 65 10,tab 202 autohs
text "Vote text",23,15 51 70 10,tab 202

edit "40",24,88 60 65 10,tab 202
text "Timelimit",25,15 61 70 10,tab 202

check "Enable mid-way tally",28,14 70 81 10,tab 202 group left
check "Execute my vote string as",29,14 90 81 10,tab 202 group left
text "a command if vote is agreed.",30,14 98 90 10,tab 202

edit "!yes",26,88 80 30 10,tab 202
edit "!no",35,125 80 30 10,tab 202
text "Vote Options",27,15 81 70 10,tab 202

box "My Vote",31,172 32 37 39,tab 202
radio "Abstain",32,175 39 27 11,tab 202 group
radio "!Yes",33,175 49 27 11,tab 202
radio "!No",34,175 59 27 11,tab 202

button "V&ote",102,176 100 30 11,tab 202

tab "Results",203
box "Vote Results",50,8 30 162 80,tab 203
text "You asked:",51,15 40 150 10,tab 203
text %choice1 $+ ": " $+ %voted.agree,52,15 50 150 10,tab 203
text %choice2 $+ ": " $+ %voted.agree,53,15 60 150 10,tab 203
text "",54,15 70 150 10,tab 203
text "",55,15 80 150 10,tab 203
text "",56,15 90 150 10,tab 203
text "",57,15 100 150 8,tab 203

button "&Apply",101,150 122 30 11
button "&Cancel",120,185 122 30 11,cancel
}

alias saveIt {
if ($did(votebox,32).state == 1) { set %myVote abs }
if ($did(votebox,33).state == 1) { set %myVote yes }
if ($did(votebox,34).state == 1) { set %myVote no }
if ($did(votebox,28).state == 1) { set %halfway 1 }
else { set %halfway 0 }
if ($did(votebox,29).state == 1) { set %usecommand 1 }
else { set %usecommand 0 }
set %vote.chan $did(votebox,20)
set %vote.question $did(votebox,22)
set %time $did(votebox,24)
set %choice1 $did(votebox,26)
set %choice2 $did(votebox,35)
}

alias initialise {
did -o votebox 20 1 %vote.chan
did -o votebox 22 1 %vote.question
did -o votebox 24 1 %time
did -o votebox 26 1 %choice1
did -o votebox 35 1 %choice2
did -o votebox 51 1 You asked: %vote.question , %choice1 or %choice2
did -o votebox 52 1 %choice1 $+ : $+ %voted.agree
did -o votebox 53 1 %choice2 $+ : $+ %voted.disagree
set %nooo 0
if ( %halfway == 1 ) { did -c votebox 28 }
else { did -u votebox 28 }
if ( %usecommand == 1 ) { did -c votebox 29 }
else { did -u votebox 29 }
if ( %myVote == yes ) { did -c votebox 33 }
if ( %myVote == abs ) { did -c votebox 32 }
if ( %myVote == no ) { did -c votebox 34 }
}

On *:DIALOG:votebox:init:0:{ initialise }

On *:DIALOG:votetbox:sclick:100:{ saveIt }
on *:DIALOG:votebox:sclick:120:{ set %makeSure 1 }

On *:DIALOG:votebox:sclick:102:{ did -f votebox 203 | VOTE | initialise }

On *:DIALOG:votebox:sclick:101:{ did -o votebox 33 1 $did(votebox,26) | did -o votebox 34 1 $did(votebox,35) | saveIt }

On *:DIALOG:votebox:edit:26:{
if ( %nooo != 1 ) {
did -o votebox 33 1 $did(votebox,26)
}
else {
.timer 1 3 did -o votebox 33 1 %choice1
}
}

On *:DIALOG:votebox:edit:35:{
if ( %nooo != 1 ) {
did -o votebox 34 1 $did(votebox,35)
}
else {
.timer 1 3 did -o votebox 34 1 %choice2
}
}

PS: do they delete old post and delete accounts after inactive a while. had to remake my account frown