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 

Help script for commands

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sat Aug 26, 2006 8:17 pm    Post subject: Help script for commands Reply with quote

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

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 Smile
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Aug 26, 2006 9:09 pm    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sat Aug 26, 2006 9:12 pm    Post subject: Reply with quote

Try changing

Code:
if {$arg == "8ball"}


To

Code:
if {$arg == "8ball"} {


Also try using proper indenting, makes it easier to read on the eye.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sat Aug 26, 2006 9:22 pm    Post subject: Reply with quote

Ok,Thanks.
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


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

PostPosted: Sat Aug 26, 2006 9:35 pm    Post subject: Reply with quote

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
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: Sun Aug 27, 2006 2:58 pm    Post subject: Reply with quote

Code:

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.
Back to top
View user's profile Send private message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Thu Aug 31, 2006 6:09 pm    Post subject: Reply with quote

Thanks i found the problem thought i forgot to set a variable for it
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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