Avatar billede hyggehesten Nybegynder
10. august 2006 - 17:05 Der er 1 løsning

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
}
Avatar billede hyggehesten Nybegynder
17. august 2006 - 19:59 #1
lukket.-
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester