Omkodning af script
Jeg sidder her med et script til mIRC, og ville høre om der var en der kunne hjælpe mig med at kode det om til TCL.Scriptet ser således ud:
on *:TEXT:!c*:#cup!:{
if (1on1 isin $1-) { goto 1on1 }
if (2on2 isin $1-) { goto 2on2 }
if (5on5 isin $1-) { goto 5on5 }
:1on1
set %cuplog $ticks
set %search $1-
writeini searches.ini search1on1 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
set %playerinfo. $+ $address($nick,5) %cuplog
timer $+ %cuplog 1 500 remini searches.ini search1on1 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
timer $+ %cuplog 1 500 unset %playerinfo. $+ $address($nick,5) %cuplog | goto end
:2on2
set %cuplog $ticks
set %search $1-
writeini -n searches.ini search2on2 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
set %playerinfo. $+ $address($nick,5) %cuplog
timer $+ %cuplog 1 500 remini searches.ini search2on2 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
timer $+ %cuplog 1 500 unset %playerinfo. $+ $address($nick,5) %cuplog | goto end
:5on5
set %cuplog $ticks
set %search $1-
writeini -n searches.ini search5on5 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
set %playerinfo. $+ $address($nick,5) %cuplog
timer $+ %cuplog 1 500 remini searches.ini search5on5 %cuplog [Nick] $nick [Chan] $6 [Slots] $8 $11-
timer $+ %cuplog 1 500 unset %playerinfo. $+ $address($nick,5) %cuplog | goto end
:end
halt
}
on *:TEXT:!s*:#cup!:{
if (1on1 isin $1-) { goto 1on1 }
if (2on2 isin $1-) { goto 2on2 }
if (5on5 isin $1-) { goto 5on5 }
:1on1
if (%playerinfo. [ $+ [ $address($nick,5) ] ] == $null) { halt }
set %finding $gettok(%playerinfo. [ $+ [ $address($nick,5) ] ],1,32)
remini searches.ini search1on1 %finding
unset %playerinfo. $+ $address($nick,5)
goto end
:2on2
if (%playerinfo. [ $+ [ $address($nick,5) ] ] == $null) { halt }
set %finding $gettok(%playerinfo. [ $+ [ $address($nick,5) ] ],1,32)
remini searches.ini search2on2 %finding
unset %playerinfo. $+ $address($nick,5)
goto end
:5on5
if (%playerinfo. [ $+ [ $address($nick,5) ] ] == $null) { halt }
set %finding $gettok(%playerinfo. [ $+ [ $address($nick,5) ] ],1,32)
remini searches.ini search5on5 %finding
unset %playerinfo. $+ $address($nick,5)
goto end
:end
halt
}
on *:TEXT:!q*:#cup!:{
if ($2 == $null) { halt }
if ($2 == 1on1) { goto 1on1 }
if ($2 == 2on2) { goto 2on2 }
if ($2 == 5on5) { goto 5on5 }
:1on1
.notice $nick %c.s 1on1 cups running %c.e
timer 1 10 .notice $nick %c.s End of List - if nothing showed, then no cups are currently available %c.e
/play -ntsearch1on1 $nick searches.ini 2000 | goto end
:2on2
.notice $nick %c.s 2on2 cups running %c.e
timer 1 10 .notice $nick %c.s End of List - if nothing showed, then no cups are currently available %c.e
/play -ntsearch2on2 $nick searches.ini 2000 | goto end
:5on5
.notice $nick %c.s 5on5 cups running %c.e
timer 1 10 .notice $nick %c.s End of List - if nothing showed, then no cups are currently available %c.e
/play -ntsearch5on5 $nick searches.ini 2000 | goto end
:end
halt
}