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.

Advanced greet

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Advanced greet

Post by TruceBuildman »

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

         _____  _______  _   _    __      __ ____  ______ 
        / ____// ____  // / / /  /  \    / // ___//__  __/ 
       / /__  / /   / // /_/ /  / /\ \  / // /_     / /    
      /  ___// /__ / //    /   / /  \ \/ // __/    / / 
     / /    / /   / // /\  \  / /    \  // /__    / / 
    /_/    /_/   /_//_/  \__\/ /      \//_____/  /_/ 
                                                     
                                                     
           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) 
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Post by TruceBuildman »

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

Code: Select all

###########################
#= 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"
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

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.
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Post by TruceBuildman »

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

#----------------------------------------------------------------------------------------------------------------------#
#                                             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"
##################################################################################################
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You need to send each line seperately.

Code: Select all

set greet {
 "         _____  _______  _   _    __      __ ____  ______ "
 "        / ____// ____  // / / /  /  \    / // ___//__  __/"
 "       / /__  / /   / // /_/ /  / /\ \  / // /_     / /    "
 .................
}

foreach line $greet {
 puthelp "privmsg #channel :$line"
}
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Post by TruceBuildman »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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

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).
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Post by TruceBuildman »

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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Replace $aire with $nick.
T
TruceBuildman
Voice
Posts: 12
Joined: Thu Jun 21, 2007 8:55 pm

Post by TruceBuildman »

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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
Post Reply