---------
TiPS
---------

With this plug Bot will say random fun random Tips , each x time.

Commands: .Tips on | .Tips off | .Tipstimer <Seconds>
Access: 80

Example:



<1987OrC> .Tips on
<ClanW3[BOT]> TIPS [ ON ]

<ClanW3[BOT]> Did You Know? The sun is 330,330 times larger than the earth.
<ClanW3[BOT]> Did You Know? The only 15-letter word that can be spelled without repeating a letter is uncopyrightable.
.
.
.

<1987OrC> .TipsTimer 60
<ClanW3[BOT]> TIMER TIPS : ( 60 Seconds )

Code:
'tips
'1.0


Sub tips_Event_Load()    
    SpamTime = 60 '60 seconds
    TimerInterval "tips", "TimerTip", (SpamTime)
    TimerEnabled "tips", "TimerTip", false
end sub

Sub Tips_event_UserTalk(Username, Flags, Message, Ping)

if left(message,1) <> BotVars.Trigger then exit sub
Call ssc.GetDBEntry(username, Access, Flags)
if access < 80 then exit sub

if lcase(message) = BotVars.Trigger & "tips on" then

	addq "/emote >> TIPS [ ON ] <<"
        TimerEnabled "tips", "TimerTip", true

end if

if lcase(message) = BotVars.Trigger & "tips off" then

	addq "/emote >> TIPS [ OFF ] <<"
        TimerEnabled "tips", "TimerTip", false

end if

If LCase(Left(Message, 11)) = BotVars.Trigger & "tipstimer " Then
	    IntTime = mid(message,12)
            if IntTime < 30 then IntTime = 60
	    addq "/emote >> TIMER TIPS : " & IntTime & " Seconds"
	    TimerInterval "tips", "TimerTip", (IntTime)
	    TimerEnabled "tips", "TimerTip", true	
end if


end sub

Sub tips_TimerTip_Timer()	 

    Addq "/emote ~ Did You Know? " & GetTip()

end sub

Function GetTip()
	
	content=ScINet.OpenURL("http://roc.replayers.com/")		
	Posx = Instr(Content,"Did you know?")	
	Content = mid(content,posx + 21,200)
	Posx = Instr(Content,"<")	
	Content = mid(content,6,posx -6)
	content = replace(content,"Replayers","W3RoC")
	content = replace(content,"replayers","W3RoC")
	GetTip = limpia(content)

end function

Function limpia(line)
 		line = replace(line,"	"," ")
		line= replace(line,"","n")
		line= replace(line,"","a")
		line= replace(line,"","e")
		line= replace(line,"","i")
		line= replace(line,"","o")
		line= replace(line,"","u")	
		limpia = line


		'text = lcase(line)
                text = line
 	 	st = "abcdefghijklmnopqrstuvwxyz()-.:[]1234567890 "
		st = st & "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?'%&()*^^=,._;"
		for c=1 to len(text)
			a=mid(text,c,1)
			'ADDCHAT VBGREEN,A
			posT = instr(st, a)
			if post > 0 then tXtsTR =  tXtsTR & a	
		next
		Limpia = tXtsTR

End Function