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 

MoxQuizz (auto-ask | topic change) [solved]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Fri Nov 24, 2006 5:37 am    Post subject: MoxQuizz (auto-ask | topic change) [solved] Reply with quote

Hi,

ist ist possible to let the moxquizz.tcl change the topic to the winners nick after each game?

I would also like it to start a game with a joining user.


thx for your help!


-typ-


Last edited by cannot_delete on Sun Jan 28, 2007 8:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Nov 24, 2006 8:35 am    Post subject: Reply with quote

This request best submitted on the MoxQuizz Forums.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Fri Nov 24, 2006 9:07 am    Post subject: Reply with quote

hi,

thx for your idea. i put the request in there as well.
the reason why i didn't do that earlier was, that it the user there aren't really active. so, i'm still open for suggestions.^^

typ
Back to top
View user's profile Send private message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Tue Nov 28, 2006 6:16 am    Post subject: Reply with quote

hi,



I found this line:



Code:
 bind join - * moxquiz_on_joined




and this:



Code:
 bind pub - !ask moxquiz_ask




!ask ist starting the game. so I added following line:





Code:
 bind join - * moxquiz_ask




but nothing happens...



moxquiz_ask:



Code:
  proc moxquiz_ask {nick host handle channel arg} {

    global qlist quizstate botnick banner bannerspace

    global tipno tiplist

    global userqnumber usergame userqlist

    global timeasked qnumber theq

    global qnum_thisgame

    global userlist timerankreset

    global quizconf

    variable anum 0

    variable txt

    ## only accept chatter on quizchannel

    if {![mx_str_ieq $channel $quizconf(quizchannel)]} {

 return

    }

    switch -exact $quizstate {

 "paused" {

     mxirc_notc $nick [mc "Game is paused."]

     return 1

 }

 "stopped" {

     mxirc_notc $nick [mc "Game is stopped."]

     return 1

 }

    }

    ## record that $nick spoke (prevents desert detection from stopping,

    ## when an user joins and starts the game with !ask)

    if {![mx_str_ieq $nick $botnick]} {

 mx_getcreate_userentry $nick $host

    }

.

.

.

 



pleas help


typ
Back to top
View user's profile Send private message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Tue Nov 28, 2006 6:29 am    Post subject: Reply with quote

Could this work for the topic-change:


Code:
  if {[mx_str_ieq $best $nick] && $bestscore > $lastbestscore} {
  array set aa $userlist($best)
  # tell the end is near
  if {$bestscore >= $quizconf(winscore)} {
                    set price "."
                    if {$quizconf(prices) == "yes"} {
                        set price " [lindex $prices [rand [llength $prices]]]"
                    }
      mxirc_say $channel [mc "%s%s reaches %d points and wins%s"
 
 

putserv "TOPIC $chan :[mc "%s%s" $nick]"


 
"[bannerspace] [botcolor txt]" $nick $quizconf(winscore) $price]
      set now [unixtime]
      if {[mx_str_ieq [maskhost $host] $lastwinner]} {
   incr lastwinnercount
   if {$lastwinnercount >= $quizconf(lastwinner_max_games)
   && $quizconf(lastwinner_restriction) == "yes"} {
       mxirc_say $channel [mc "%s: since you won %d games in a row, you will be ignored for the next game." $nick $quizconf(lastwinner_max_games)]
   }
      } else {



I added the

Code:
putserv "TOPIC $chan :[mc "%s%s" $nick]"
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Nov 28, 2006 6:31 am    Post subject: Reply with quote

1) Read the tcl-commands.doc that comes with eggdrop about 'bind' and particularly about the 'join' bind (which uses different parameters than 'pub' so you'd have to make another new proc to handle the 'bind join' anyway)

2) Do you *really* want the game to be started every time a person joins? that will make the game restart *every* time someone joins, which would be highly annoying to those already in the game..

3) Why not just use a script to announce in notice to the user when they join, about how to start the game with the public command?
Back to top
View user's profile Send private message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Tue Nov 28, 2006 11:48 am    Post subject: Reply with quote

hi,

1) i looked up the command and found out that it is stackable, thx Wink

2) no, i didn't know that this comamnd would resart the game every time someone joins. i simply want to start a game when none is running. right now i have another bot that puts an "!ask" into the channel every time someone joins. but this bot is only on when i am on and annoys already playing users.

3) my channel is joined by many people who haven't played the quiz before and noone reads the onjoin notice Confused

thx
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Nov 28, 2006 3:49 pm    Post subject: Reply with quote

If people don't want to read notices, there's not much you can do about it (in other words, if people want to be stupid, oh well)
Back to top
View user's profile Send private message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Tue Nov 28, 2006 4:22 pm    Post subject: Reply with quote

well, i could start the quiz^^


/edit:
seriously: when joining my channel on startup, one gets enough messages form the gamesurge server and the moxuiz - bot. another notice by me including the !ask - command wouldn't be read.
Back to top
View user's profile Send private message
cannot_delete
Voice


Joined: 24 Nov 2006
Posts: 31

PostPosted: Fri Dec 15, 2006 4:53 pm    Post subject: Reply with quote

can be closed
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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