egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can any one change this great irc game script to TCL script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
4mirc
Voice


Joined: 16 May 2008
Posts: 37

PostPosted: Thu Nov 11, 2010 2:57 pm    Post subject: can any one change this great irc game script to TCL script Reply with quote

hello all

i have irc game script and i need to make it work in Eggdrop bot

i know all will love this game coz its good and funny

this is the mirc script code

Code:
on *:text:!wnick:#: {
  if (%qnick.game-status != on) {
    set %qnick.game-status on
    set %qnick.game-nick $qnickrand($chan)
    set %qnick.game-last-nick %qnick.game-nick
    if (!%qnick.game-games) { set %qnick.game-games 1 }
    if (%qnick.game-games) { inc %qnick.game-games }
    /msg $chan 7W14nick-Gam7E 7N14ew Nic7K 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14o Stop this nic7K9:4 !wstop
    /nscrammble %qnick.game-nick $chan
    set %qnick.game-start $ctime
  }
  else {
    if (!%floo-time) {
      set -u15 %floo-time ok
      /nscrammble %qnick.game-nick $chan
    }
  }
}   
alias qnickrand {
  var %qnick.game-nick1 = $nick($1,$r(1,$nick($1,0)))
  while ( %qnick.game-nick1 = %qnick.game-last-nick ) {
    set %qnick.game-nick1 $nick($1,$r(1,$nick($1,0)))
  }
  return %qnick.game-nick1
}
alias nscrammble {
  /msg $2 7W14nick-Gam7e  12( $+ Game N°: $+ %qnick.game-games $+ 12) 7U14nscramble this NickNam7E9: $misturecs(%qnick.game-nick)
}
on *:text:%qnick.game-nick:#: {
  if (%qnick.game-status == on) {
    /msg $chan 7[4 $nick 7] 7W14inns the gam7E 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: $duration($calc($ctime - %qnick.game-start)) 7T14he nickname wa7S:4 %qnick.game-nick 
    /msg $chan 7W14nick-Gam7e 7T14o new gam7E4 !wnick
    set %qnick.game-status off
    unset %qnick.game-nick
  }
}
on *:text:!wstop:#: {
  if (%qnick.game-status == on) {
    /msg $chan 7W14nick-Gam7e 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: 9 $duration($calc($ctime - %qnick.game-start)) 7S14toped!!7!
    /msg $chan 7W14nick-Gam7e  7N14oOne get it right!!! The Scrambled nickname wa7S9:4 %qnick.game-nick
    set %qnick.game-status off
    unset %qnick.game-nick
    /msg $chan 7W14nick-Gam7e  7T14o a new scrambled nick Typ7E9:4 !wnick
  }
}
;# yeahss you never seen this!!!     #
;# Becouse this on IS MINE ONE :pPpP #
alias misturecs {
  var %trrr = $lower($1)
  var %trr = $len($1)
  var %trr1 = 1
  while (%trr1 <= %trr) {
    var %trr2 = %trr2 $+ $mid(%trrr,%trr1,1) $+ .
    inc %trr1
  }
  var %tra = %trr2
  var %tr = $numtok(%trr2,46)
  var %tr1 = 1
  var %tr2 = %tr
  while (%tr1 <= %tr) {
    set %tr3  $rand(1,%tr2)
    var %trr12 = $remove(%tra,.)
    var %tr4 = %tr4 $+ $mid(%trr12,%tr3,1)
    var %tra = $deltok(%tra,%tr3,46)
    dec %tr2
    inc %tr1
  }
  return %tr4
}
;############ The End :)~ ##################


when any user type this on the channel !wnick

the bot will choose nick from the channel and u need to know which nick is that

example :

Code:
[08:45:58‹pm›] ‹!AnR› !wnick
[08:45:59‹pm›] (@Game-Bot) Wnick-GamE New NicK (Game N°:3) To Stop this nicK: !wstop
[08:46:00‹pm›] (@Game-Bot) Wnick-Game (Game N°:3) Unscramble this NickNamE: snro1pac
[08:46:04‹pm›] (@Dex) Scorp1an
[08:46:05‹pm›] (@Game-Bot) [ Dex ] Winns the gamE (Game N°:3) TimeGamE: 6secs The nickname waS: Scorp1an
[08:46:05‹pm›] (@Game-Bot) Wnick-Game To new gamE !wnick


can any one help me in this game Sad

Thanks for all
Back to top
View user's profile Send private message Visit poster's website
4mirc
Voice


Joined: 16 May 2008
Posts: 37

PostPosted: Sat Nov 13, 2010 2:57 am    Post subject: Reply with quote

hello again

if my request in wrong section tell me to ask in other place

is it allowed to put irc script to make it tcl or not ?
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sat Nov 13, 2010 7:33 am    Post subject: Reply with quote

Have you found your topic moved to Junk Yard? The role of the The 'Script Requests' section of this forum doesn't create any obligations to anyone.

From the output it seems to be some sort of nick scrambling game. Here some hints on how this can be done.
Code:

# scramble proc by stdragon
proc scramble {word} {
  set letters [split $word ""]
  set newword ""
  while {[llength $letters]} {
    set i [rand [llength $letters]]
    append newword [lindex $letters $i]
    set letters [lreplace $letters $i $i]
  }
  return $newword
}

With this code you scramble a word, in your case the nickname you randomly pick from the channel. To pick one use something like:
Code:

set users [chanlist $channel]
set user [lindex $users [rand [llength $users]]]

and to scramble that randomly picked nickname do:
Code:

set scrambled_nick [scramble $user]

_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
4mirc
Voice


Joined: 16 May 2008
Posts: 37

PostPosted: Sat Nov 13, 2010 10:35 am    Post subject: Reply with quote

thx caesar for the reply

but sorry i guess its hard to me to make it coz i can understand tcl codes

if u or any one can make full tcl script that would good

thanks alot
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber