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.

Help script for commands

Help for those learning Tcl or writing their own scripts.
Post Reply
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Help script for commands

Post by monie089 »

Im tryin to make a simple help script but its keep saying cant execute the $text and other stuff.

Code: Select all

bind pub @help pub:help
proc pub:help {nick host hand botnick chan arg } {

if {$arg == ""} {
putserv "PRIVMSG $chan :\001ACTION\001 Bringing the whoopin stick to $nick bet its gone hurt >:)"
putserv "NOTICE $nick :Help commands start with @help <command> the command should have the @"
}
if {$arg == "sitecheck"} {
putserv "NOTICE $nick :The command Sitecheck will check for any site that you put in to see if that website 

is up"
putserv "Notice $nick :This makes it easier then checking yourself and it saves time"
putserv "NOTICE $nick :\004Usage:\004 @sitecheck <url> - to check the site"
}
if {$arg == "uptime"} {
putserv "NOTICE $nick :This simple script shows the uptime for $botnick"
putserv "NOTICE $nick :SYNTAX:@uptime thats all :)"
}
if {$arg == "news"} {
putserv "NOTICE $nick :This shows the lastest news from site.nintendoxg.com/news.php"
putserv "NOTICE $nick :Right now it doest show the lastest 5 innstead it shows all ;)"
putserv "NOTICE $nick :SYNTAX:@news and it will display all the news for ;)"
}
if {$arg == "online"} {
putserv "NOTICE $nick :This command will show the users currently online at NintendoXG"
putserv "NOTICE $nick :Right now it doesnt show the names instead it shows the statistic"
putserv "NOTICE $nick :SYNTAX: @online shows the statics"
}
if {$arg == "8ball"}
putserv "NOTICE $nick :The magic 8ball customly made yes"
putserv "NOTICE $nick :come have your 8ball questions answered told"
putserv "NOTICE $nick :SYNTAX:@8ball <question>"
}
if {$arg == "destroy"} {
putserv "NOTICE $nick :The destroy script is a beta version that i got bored with"
putserv "NOTICE $nick :It is a fun game that you can play and i will make more"
putserv "NOTICE $nick :SYNTAX:@destroy <nick>"
}
if {$arg == "google"} {
putserv "NOTICE $nick :Google can search for anything you input for it"
putserv "NOTICE $nick :Right now it can only do @google and not the others"
putserv "NOTICE $nick :SYNTAX:@google <thinghere>"
}
}
putlog "Help script loaded"
Can someone please help me :)
New server irc.NintendoXG.com come and visit
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

botnick shouldn't be there as argument of pub:help
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Try changing

Code: Select all

if {$arg == "8ball"}
To

Code: Select all

if {$arg == "8ball"} {
Also try using proper indenting, makes it easier to read on the eye.
r0t3n @ #r0t3n @ Quakenet
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

Ok,Thanks.
New server irc.NintendoXG.com come and visit
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Tosser^^ wrote:Also try using proper indenting, makes it easier to read on the eye.
The user has been told this on more than one occassion and simply refuses to adhere to the advice.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind pub - @help pub:help

proc pub:help {nick host hand chan txt} {
  switch [string tolower [lindex [split $txt] 0]] {
    "sitecheck" {
      putserv "NOTICE $nick :The command Sitecheck will check for any site that you put in to see if that website is up"
      putserv "Notice $nick :This makes it easier then checking yourself and it saves time"
      putserv "NOTICE $nick :\004Usage:\004 @sitecheck <url> - to check the site"
    }
    "uptime" {
      putserv "NOTICE $nick :This simple script shows the uptime for $::botnick"
      putserv "NOTICE $nick :SYNTAX:@uptime thats all :)"
    }
    "news" {
      putserv "NOTICE $nick :This shows the lastest news from site.nintendoxg.com/news.php"
      putserv "NOTICE $nick :Right now it doest show the lastest 5 innstead it shows all ;)"
      putserv "NOTICE $nick :SYNTAX:@news and it will display all the news for ;)"
    }
    "online" {
      putserv "NOTICE $nick :This command will show the users currently online at NintendoXG"
      putserv "NOTICE $nick :Right now it doesnt show the names instead it shows the statistic"
      putserv "NOTICE $nick :SYNTAX: @online shows the statics"
    }
    "8ball" {
      putserv "NOTICE $nick :The magic 8ball customly made yes"
      putserv "NOTICE $nick :come have your 8ball questions answered told"
      putserv "NOTICE $nick :SYNTAX:@8ball <question>"
    }
    "destroy" {
      putserv "NOTICE $nick :The destroy script is a beta version that i got bored with"
      putserv "NOTICE $nick :It is a fun game that you can play and i will make more"
      putserv "NOTICE $nick :SYNTAX:@destroy <nick>"
    }
    "google" {
      putserv "NOTICE $nick :Google can search for anything you input for it"
      putserv "NOTICE $nick :Right now it can only do @google and not the others"
      putserv "NOTICE $nick :SYNTAX:@google <thinghere>"
    }
    default {
      putserv "PRIVMSG $chan :\001ACTION\001 Bringing the whoopin stick to $nick bet its gone hurt >:)"
      putserv "NOTICE $nick :Help commands start with @help <command> the command should have the @"
    }
  }
}

putlog "Help script loaded"
Once the game is over, the king and the pawn go back in the same box.
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

Thanks i found the problem thought i forgot to set a variable for it
New server irc.NintendoXG.com come and visit
Post Reply