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.

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

Support & discussion of released scripts, and announcements of new releases.
Post Reply
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

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

Post by cannot_delete »

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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This request best submitted on the MoxQuizz Forums.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

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
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

hi,



I found this line:


Code: Select all

 bind join - * moxquiz_on_joined 


and this:


Code: Select all

 bind pub - !ask moxquiz_ask 


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




Code: Select all

 bind join - * moxquiz_ask 


but nothing happens...



moxquiz_ask:


Code: Select all

  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
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

Could this work for the topic-change:

Code: Select all

  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: Select all

putserv "TOPIC $chan :[mc "%s%s" $nick]"
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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?
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

hi,

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

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 :?

thx
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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)
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

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.
c
cannot_delete
Voice
Posts: 31
Joined: Fri Nov 24, 2006 5:31 am

Post by cannot_delete »

can be closed
Post Reply