This is the new home of the egghelp.org community forum. this announcement post . Click the X in the top right-corner of this box to dismiss this message. 
Old posts that have not been replied to for several years.
			
		
				
			
				
								FuE- 							 
						Halfop 			
		Posts:  57 Joined:  Sat Nov 27, 2004 3:46 pm 
		
						
					
													
							
						
									
						Post 
					 
								by FuE-  Fri Feb 25, 2005 9:17 pm 
			
			
			
			
			
			hi i use 
http://www.eggdrop.za.net/  trivia script. if i wanna make so if i write !rank in mainchan i can see my rank to and f i write !rank <user> i can se others rank to.. how can i do that.. the text below is the script from the /msg <bot> rank..... please help me
Code: Select all 
#triggered when someone /msgs the bot with the score lookup command.
proc tgscorelookup {nick host hand text} {
	global tgscoresbyname tgranksbyname tgscorestotal tgrealnames
	if {$text==""} { set text $nick } else { set text [lindex [split $text] 0] }
	tggetscores
	if {![info exists tgscoresbyname([strlwr $text])]} {
		if {[strlwr $text]==[strlwr $nick]} {
			set _who "[tgcolmisc1]You are"
		} else {
			set _who "[tgcolmisc2]$text [tgcolmisc1]is"
		}
		[tgpriv] $nick "[tgbold]$_who [tgcolmisc1]not on the score list."
	} else {
		if {[strlwr $text]==[strlwr $nick]} {
			set _who "[tgcolmisc1]You have"
		} else {
			set _who "[tgcolmisc2]$tgrealnames([strlwr $text]) [tgcolmisc1]has"
		}
		[tgpriv] $nick "[tgbold]$_who [tgcolmisc2]$tgscoresbyname([strlwr $text])[tgcolmisc1] points, ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $text])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]."
	}
}
 
		 
				
		
		 
	 
				
		
				
			
				
								^DooM^ 							 
						Owner 			
		Posts:  772 Joined:  Tue Aug 26, 2003 5:40 pmLocation:  IronForge
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by ^DooM^  Fri Feb 25, 2005 9:39 pm 
			
			
			
			
			
			add a new bind command at the top of the script with the other binds.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born 
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								FuE- 							 
						Halfop 			
		Posts:  57 Joined:  Sat Nov 27, 2004 3:46 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by FuE-  Fri Feb 25, 2005 9:49 pm 
			
			
			
			
			
			what ya mean (= help me  
 
		 
				
		
		 
	 
				
		
				
			
				
								dossi 							 
						Voice 			
		Posts:  30 Joined:  Mon Dec 20, 2004 9:21 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by dossi  Sat Feb 26, 2005 1:38 am 
			
			
			
			
			
			Add that line to the beginning of the script.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								^DooM^ 							 
						Owner 			
		Posts:  772 Joined:  Tue Aug 26, 2003 5:40 pmLocation:  IronForge
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by ^DooM^  Sat Feb 26, 2005 3:58 am 
			
			
			
			
			
			FuE- wrote: what ya mean (= help me  
Look in your trivia script. At the top of the script you should see a few lines with the word 
bind  at the front.
Under the last 
bind  copy this bit of code into the script.
 Save the script.
Restart your bot.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born 
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								FuE- 							 
						Halfop 			
		Posts:  57 Joined:  Sat Nov 27, 2004 3:46 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by FuE-  Sat Feb 26, 2005 6:34 am 
			
			
			
			
			
			i added
Code: Select all 
bind pub -|- !rank proc_tgscorelookup
and when i do !rank i get
Code: Select all 
tcl error [proc_tgsscorelookup]: invalid command name "proc_tgsscorelookup"
i changed it to
and i get
Code: Select all 
tcl error [tgsscorelookup]: wrong # args: should be "tgsscorelookup nick host hande text" 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Sat Feb 26, 2005 7:01 am 
			
			
			
			
			
			
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								FuE- 							 
						Halfop 			
		Posts:  57 Joined:  Sat Nov 27, 2004 3:46 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by FuE-  Sat Feb 26, 2005 7:08 am 
			
			
			
			
			
			wrong again.. this is my script now...
Code: Select all 
### SET PROCS ###############
set procs {
	rank:proc_tgscorelookup
}
#############################
### SET BINDINGS ############
bind pub -|- !rank proc_tgscorelookup
#############################
proc proc_tgscorelookup {nick host hand text} {
   global tgscoresbyname tgranksbyname tgscorestotal tgrealnames
   if {$text==""} { set text $nick } else { set text [lindex [split $text] 0] }
   tggetscores
   if {![info exists tgscoresbyname([strlwr $text])]} {
      if {[strlwr $text]==[strlwr $nick]} {
         set _who "[tgcolmisc1]You are"
      } else {
         set _who "[tgcolmisc2]$text [tgcolmisc1]is"
      }
      [tgpriv] $nick "[tgbold]$_who [tgcolmisc1]not on the score list."
   } else {
      if {[strlwr $text]==[strlwr $nick]} {
         set _who "[tgcolmisc1]You have"
      } else {
         set _who "[tgcolmisc2]$tgrealnames([strlwr $text]) [tgcolmisc1]has"
      }
      [tgpriv] $nick "[tgbold]$_who [tgcolmisc2]$tgscoresbyname([strlwr $text])[tgcolmisc1] points, ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $text])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]."
   }
}  
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Sat Feb 26, 2005 7:15 am 
			
			
			
			
			
			FuE- wrote: wrong again.. this is my script now...
Code: Select all 
### SET PROCS ###############
set procs {
	rank:proc_tgscorelookup
}
#############################
### SET BINDINGS ############
bind pub -|- !rank proc_tgscorelookup
#############################
proc proc_tgscorelookup {nick host hand text} {
   global tgscoresbyname tgranksbyname tgscorestotal tgrealnames
   if {$text==""} { set text $nick } else { set text [lindex [split $text] 0] }
   tggetscores
   if {![info exists tgscoresbyname([strlwr $text])]} {
      if {[strlwr $text]==[strlwr $nick]} {
         set _who "[tgcolmisc1]You are"
      } else {
         set _who "[tgcolmisc2]$text [tgcolmisc1]is"
      }
      [tgpriv] $nick "[tgbold]$_who [tgcolmisc1]not on the score list."
   } else {
      if {[strlwr $text]==[strlwr $nick]} {
         set _who "[tgcolmisc1]You have"
      } else {
         set _who "[tgcolmisc2]$tgrealnames([strlwr $text]) [tgcolmisc1]has"
      }
      [tgpriv] $nick "[tgbold]$_who [tgcolmisc2]$tgscoresbyname([strlwr $text])[tgcolmisc1] points, ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $text])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]."
   }
} 
You didn't try what I suggested. Also, there's no need for "set procs" and there's no need to make a new proc while it already exists in trivia.tcl
 
		 
				
		
		 
	 
				
		
				
			
				
								FuE- 							 
						Halfop 			
		Posts:  57 Joined:  Sat Nov 27, 2004 3:46 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by FuE-  Sat Feb 26, 2005 7:19 am 
			
			
			
			
			
			i fixed, tnx dudes  
 
		 
				
		
		 
	 
				
		
				
			
				
								teduh 							 
						Voice 			
		Posts:  2 Joined:  Mon May 02, 2005 1:55 am 
		
						
					
													
							
						
									
						Post 
					 
								by teduh  Mon May 02, 2005 2:02 am 
			
			
			
			
			
			I use 
http://www.eggdrop.za.net/  trivia scripts and work fine, is it any other way to change if user wanna se their score just by typing just !score  on the channel , rather than /msg <botnick> score
thanks
 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Mon May 02, 2005 9:28 am 
			
			
			
			
			
			If you read what we've done in this thread, you would've noticed that he requested the same but it's !rank and not !score... If you want, just change !rank to !score.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								teduh 							 
						Voice 			
		Posts:  2 Joined:  Mon May 02, 2005 1:55 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by teduh  Tue May 03, 2005 6:49 am 
			
			
			
			
			
			Sir_Fs said:
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Tue May 03, 2005 7:57 am 
			
			
			
			
			
			I'm not sure about that, but I think it'll only display your score/rank... try it.