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

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


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Tue Sep 19, 2006 7:38 am    Post subject: moxquizz Reply with quote

Code:


-----------------------------
[b]# mini funstuff
bind pub - !hi moxquiz_pub_hi
bind ctcp - action moxquiz_purr[/b]
------------------------------

# say Hi to "known" users
proc moxquiz_purr {nick host handle channel action arg} {
    global quizconf allstarsarray

    # [pending] translate this
    set tlist [list "purrs." \
                   "meows." \
                   "happily hops around."]

    if {$action == "ACTION" && arg == "pats $botnick" &&
        [mx_str_ieq $channel $quizconf(quizchannel)] &&
        ([validuser $handle] || [info exists allstarsarray($nick)]) } {
        mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
    }
}



Errer is on action when someone type /me anything the BOT in has DCC type

Tcl error [moxquiz_purr]: syntax error in expression "$action == "ACTION" && arg == "pats $botnick" &&



i hope someone will find the reason of Errer i try my best on it
regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Tue Sep 19, 2006 8:26 am    Post subject: Reply with quote

Your missing the $ before arg:

Code:
if {$action == "ACTION" && $arg == "pats $botnick" && [mx_str_ieq $channel $quizconf(quizchannel)] && ([validuser $handle] || [info exists allstarsarray($nick)]) } {

_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Tue Sep 19, 2006 10:52 am    Post subject: Reply with quote

the problem is afaik mainly the unescaped newline. I bypassed by simply putting it into one line:
Code:
    if {$action == "ACTION" && $arg == "pats $botnick" && [mx_str_ieq $channel $quizconf(quizchannel)] && ([validuser $handle] || [info exists allstarsarray($nick)]) } {
        mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
    }


PS: I sent in this fix more than a year ago to the creator... but either email failed or he nolonger responds to them Very Happy.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Tue Sep 19, 2006 1:17 pm    Post subject: Thanks Reply with quote

Thanks it works thanks alot
Regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Thu Sep 21, 2006 4:23 am    Post subject: heay Reply with quote

it was fine but suddenly i see this Errer 2 Sad don't know where shuold i FIND the prob.,.,.,.,.,

Errer
-------------------------------------------------------------------
Tcl error [moxquiz_purr]: can't read "botnick": no such variable
--------------------------------------------------------------------

Quote:

## Version:
set version_moxquizz "0.8.1"

package require msgcat

namespace import -force msgcat::*

###########################################################################
##
## ATTENTION:
##
## Defaults for bot configuration. Don't edit here, edit the file
## moxquizz.rc instead!
##
###########################################################################


# system stuff
variable quizbasedir moxquizz
variable datadir $quizbasedir/quizdata
variable configfile $quizbasedir/moxquizz.rc
variable intldir $quizbasedir/intl

variable rankfile $datadir/rank.data
variable allstarsfile $datadir/rankallstars.data
variable statsfile $datadir/stats.data
variable userqfile $datadir/questions.user.new
variable commentsfile $datadir/comments.txt

variable quizhelp

# these will be searched in $intldir/$quizconf(language)
variable channeltipfile channeltips.txt
variable channelrulesfile channelrules.txt
variable pricesfile prices.txt
variable helpfile help.txt



what am i do ?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Thu Sep 21, 2006 5:16 am    Post subject: Reply with quote

Add:
Code:
global botnick

After the:
Quote:
global quizconf allstarsarray
line
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Thu Sep 21, 2006 5:31 am    Post subject: i don't know why i can' Reply with quote

i don't know why its not pasting all ?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Thu Sep 21, 2006 5:42 am    Post subject: sorry Reply with quote

Quote:

# say Hi to "known" users
proc moxquiz_purr {nick host handle channel action arg} {
global quizconf allstarsarray
global botnick
# [pending] translate this
set tlist [list "purrs." \
"meows." \
"happily hops around."]

if {$action == "ACTION" && $arg == "pats $botnick" &&
[mx_str_ieq $channel $quizconf(quizchannel)] &&
([validuser $handle] || [info exists allstarsarray($nick)]) } {
mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
}
}
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Alchera
Revered One


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

PostPosted: Thu Sep 21, 2006 8:55 pm    Post subject: Reply with quote

You do not edit any Tcl file you edit the .rc file as per instructions.
Quote:
## Defaults for bot configuration. Don't edit here, edit the file
## moxquizz.rc instead!

_________________
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
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