This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

TCL Help

Old posts that have not been replied to for several years.
Locked
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

TCL Help

Post by Jag »

hello,
someone can replace this code in mirc-scripting to TCL please?

Code: Select all

alias svars { 
  var %t = 1 
  while (%t <= $var($1,0)) { 
    if ($isid) && ($var($remove($1,*) $+ . $+ $2,1).value) var %b = $ifmatch, %c = 1 
    var %a = 1, %i = %t 
    while (%i) { 
      inc %i 
      if (%i > $var($1,0)) %i = 1 
      if ($isid) && (%c) && (%b < $var($1,%i).value) inc %c 
      if (%i == %t) { 
        if (%b) return %c 
        if ($isid) && ($2 == %a) return $gettok($var($1,%t),2,46) 
        elseif ($2 == write) writeini sidur.ini dirug %a $gettok($var($1,%t),2,46) 
        elseif ($2 == set) set %place. [ $+ [ $gettok($var($1,%t),2,46) ] ] %a 
        unset %i 
        inc %t 
      } 
      if ($var($1,%t).value < $var($1,%i).value) inc %a 
    } 
  } 
} 

Thanks :)
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

please? :cry:
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

http://www.suninet.nl/tclguide

You have some reading to do.
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

how do i write:

Code: Select all

while (%t <= $var($1,0)) {
in TCL ?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Why don't you explain what happens there or better, what exactly do you want to do?
Once the game is over, the king and the pawn go back in the same box.
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

I want a counting script, that counting lines the people are writing.
and when i write to the bot in the DCC:

Code: Select all

.!top2

.!top3

.!top4

.!top5
It will show me the nicknames of the people were wrote the top 2\3\4\5 lines.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

Code: Select all

while (%t <= $var($1,0)) {
i dont know mirc, but i think it's something like that...

Code: Select all

while {[expr $t <= $var($1,0)]} {
means while the number in $t is smaller / equail to the one stored in the array $var($1,0) do....
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

This sounds like an stats script to me.. anyway, there are two alternatives to do it (store the status of each user):
1. Using arrays upon a public msg (pubm) increase an array with #channel and uhost or nick of the person or whatever you want;
2. Read/Write in a file the same thing as in the case of the array, with #channel nick .. etc.
Once the game is over, the king and the pawn go back in the same box.
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

oh, 10x :P
How do i Read/Write in a file ?
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

and where can i download the 'stats'script? :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

at the r0x0ring site, you can find a good stats script.
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

Jag wrote:oh, 10x :P
How do i Read/Write in a file ?
please? :-?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The read and write have been discussed before. Use the forum Search function.
Once the game is over, the king and the pawn go back in the same box.
J
Jag
Halfop
Posts: 90
Joined: Fri Sep 19, 2003 10:06 am

Post by Jag »

thanks a lot for all of you :D
Locked