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 

Advanced greet

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 9:43 am    Post subject: Advanced greet Reply with quote

I am having a little trouble making a greet for my bot.
The main issue I am having is the fact that I am using ASCII in the begining of the greet (slashes and such to make large letters, much like when your eggdrop greets you when you DCC him, that logo). My bot isnt able to display the message fully in the channel (Only posts one line of it), and other scripts I've tried caused my eggdrop to crash, but I am guessing it's because of the greet itself, not the script, my bot loads other scripts fine.

Basically the best way to describe what I am doing is trying to make my eggdrop post this into my notice screen (not in channel, but in the other window...)


Code:

         _____  _______  _   _    __      __ ____  ______
        / ____// ____  // / / /  /  \    / // ___//__  __/
       / /__  / /   / // /_/ /  / /\ \  / // /_     / /   
      /  ___// /__ / //    /   / /  \ \/ // __/    / /
     / /    / /   / // /\  \  / /    \  // /__    / /
    /_/    /_/   /_//_/  \__\/ /      \//_____/  /_/
                                                     
                                                     
           11111      9999999999       222222222     
          111111      9999999999     222     222     
             111      999    999    222       222   
             111      999    999              222   
             111      9999999999             222     
             111      9999999999            222     
             111           99999           222       
             111          99999           222       
           1111111       99999           22222222           
        11111111111    99999          222222222222   
                                                     
         PRETTY MUCH MORE POPULAR THEN FOOTBALL!     
                  (Sean Green, iD Software)
Back to top
View user's profile Send private message
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 10:04 am    Post subject: Reply with quote

This is an excerpt from the script that I use, it was pretty straightforward.

Code:
###########################
#= CONFIGURATION SECTION =#
###########################

## PUT THE CHANNEL HERE IN WHICH YOU WANT THIS SCRIPT TO WORK ##
## YOU CAN USE THIS SCRIPT IN ONLY ONE CHANNEL SO DONOT ENTER MORE THAN ONE CHANNEL IT WILL CAUSE TROBLE ##

set urchan "#faknet192"

## ENTER THE PATH OF THE FILE CONTAINING WELCOME MESSAGES ##
## IF YOU WILL LEAVE IT AS IT IS YOU HAVE TO PUT THE "welcome.txt" FILE INTO SCRIPTS FOLDER ##

set txtfile "scripts/faknet.txt"
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat Jun 23, 2007 12:37 pm    Post subject: Reply with quote

If you want help with your script, I suggest posting the entire script.
If you are looking for someone to write the script it for you, you should get a moderator to move this to Script Requests.
Back to top
View user's profile Send private message
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 12:43 pm    Post subject: Reply with quote

I'll post the whole script but honestly at this point I have zero idea on what I am doing so if I am better off getting someone to write me a script let me know.

BTW: I am just using this script for testing if it COULD work, I'd plan on using a more advanced script as I want to be able to put the greet in notices.

Code:
#----------------------------------------------------------------------------------------------------------------------#
#                                             AUTO WELCOME SCRIPT BY RANA USMAN                                        #
#----------------------------------------------------------------------------------------------------------------------#
### AUTHOR : RANA USMAN
### VERSION : 1
### EMAIL : coolguy_rusman@yahoo.com , usmanrana33@hotmail.com
### URL : www.ranausman.tk , www.airevision.tk
### Catch me @ UNDERNET my nick is : ^Rana^Usman

###############
# DESCRIPTION #
###############
#Assalam O Aleikum n Hello,so you want to know something about this script hmm ok here we go.the purpose of this script
#is to welcome the users who enter the specific channel you put in configuration.You can set customized welcome messages
#in a text file known as welcome.txt, Just Open it n Start entering the welcome messages you want ur bot to say.you can set
#Welcome messages in your own language too :) it is usefull to attract peoples of your country :).


###########################
#= CONFIGURATION SECTION =#
###########################

## PUT THE CHANNEL HERE IN WHICH YOU WANT THIS SCRIPT TO WORK ##
## YOU CAN USE THIS SCRIPT IN ONLY ONE CHANNEL SO DONOT ENTER MORE THAN ONE CHANNEL IT WILL CAUSE TROBLE ##

set urchan "#faknet192"

## ENTER THE PATH OF THE FILE CONTAINING WELCOME MESSAGES ##
## IF YOU WILL LEAVE IT AS IT IS YOU HAVE TO PUT THE "welcome.txt" FILE INTO SCRIPTS FOLDER ##

set txtfile "scripts/faknet.txt"

###########################
# CONFIGURATION ENDS HERE #
###########################


#--------------------------------------------------------------------------------------------------------------------#
#  SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE!  #
#--------------------------------------------------------------------------------------------------------------------#

bind join - * RanaUsman:wjoin

proc RanaUsman:wjoin {nick host handle chan} {
global urchan txtfile
      set aire $urchan
      set ranadil [open $txtfile r]
      set readvar [split [read $ranadil] \n]
      close $ranadil
      putserv "PRIVMSG $aire :[lindex $readvar [rand [llength $readvar]]]"
}
#Ever Seen such simple coding ??? eh

##################################################################################################
putlog "\002*Auto Welcome Script* by *Rana Usman* (www.ranausman.tk) has been successfully LOADED"
##################################################################################################
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 23, 2007 5:14 pm    Post subject: Reply with quote

You need to send each line seperately.
Code:
set greet {
 "         _____  _______  _   _    __      __ ____  ______ "
 "        / ____// ____  // / / /  /  \    / // ___//__  __/"
 "       / /__  / /   / // /_/ /  / /\ \  / // /_     / /    "
 .................
}

foreach line $greet {
 puthelp "privmsg #channel :$line"
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 7:37 pm    Post subject: Reply with quote

I tried quoting each one, one by one, but it would either post some letters of it (using a different script) and keep posting them till it posted them all, or with THAT script I posted, it would do :

" "

with nothing in those quotes, and if I did all of the logo, then I'd only get the last written part as the greet (without the end)

**EDIT : Now it randomizes....sometimes when I enter it posts one line, sometimes two, and I don't even have the script in my conf :S
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 23, 2007 7:58 pm    Post subject: Reply with quote

That's what the script does. It send a random line from the file. Replace RanaUsman:wjoin proc with this edited version of the proc:
Code:
proc RanaUsman:wjoin {nick host handle chan} {
 global urchan txtfile
 set aire $urchan
 set ranadil [open $txtfile r]
 set readvar [split [read $ranadil] \n]
 close $ranadil
 foreach line $readvar {
  puthelp "PRIVMSG $aire :$line"
 }
}

The file should contain your logo (without the quotes).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 8:29 pm    Post subject: Reply with quote

Okay it worked, now how can I make it so that it appears through a private message to everyone who joins the channel? Or else I'll flood the channel if I get more than one person joining at a time.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 23, 2007 8:35 pm    Post subject: Reply with quote

Replace $aire with $nick.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
TruceBuildman
Voice


Joined: 21 Jun 2007
Posts: 12

PostPosted: Sat Jun 23, 2007 8:52 pm    Post subject: Reply with quote

Thanks, it worked, I was thinking if it were possible to be able to request the greeting by a user, because I'd have it set in the topic on how to request the message and instead of each person joining the channel and getting that message forcefully, they could request it and my bot would sent it to them.

Thanks,
Truce.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 23, 2007 8:56 pm    Post subject: Reply with quote

Ok, so you need a pub bind instead. Read Tcl-commands.doc about the pub bind then you'll know what to change in the RanaUsman:wjoin proc.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
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 Requests 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