This is just like a fortune cookie. (it gives you your fortune and some lucky numbers.) Just type !fortune to use. (only other people can use this (not you) in less they got this code )
; PLACE ALL IN REMOTES
; This is just like a fortune cookie (it gives you your fortune and lucky numbers)
; You can always add one by typing ( write fortune.txt (then what you want) )
; You can edit anything behind write fortune.txt
; (For privacy) You can take out ( /msg # $nick is looking at his fortune ) and it won't say in a room he is looking at his fortune
; Only other people can use this (not you)
; Use by other people Typing ( !fortune )
on *:TEXT:!fortune:#: {
/notice $nick $read fortune.txt
/notice $nick Your lucky numbers are $rand(0,20), $rand(10,50), $rand(30,70), and $rand(50,99).
/msg # $nick is looking at his fortune.
write fortune.txt Your words are going to bring peace to alot of people !
write fortune.txt You will find it easy to stand up and accomplish your goals !
write fortune.txt You will have to be brave and stand up !
write fortune.txt One day you will be treated like a real man!
write fortune.txt You will find new and easier ways in life!
write fortune.txt You will have lots of Good luck in the future!
write fortune.txt People love the way you are now don't change your looks or attidude!
write fortune.txt Have fun look at the bright sides even if stuff go's wrong!
write fortune.txt Your destin is to become a rich man!
write fortune.txt Life will become faster and faster as you get older, Have as much fun as you can now!
write fortune.txt Your fortune is not to good if you make the wrong choices, so make a wise and smart decision!
write fortune.txt Your fortune is bright you luck will help you in many ways!
write fortune.txt Life is not always fair but try to get the best out of it!
write fortune.txt Have as much fun as you can now, cause it will get harder when you get older!
write fortune.txt Spend time with people, cause you might not see them tomorrow!
write fortune.txt You are always being test, Make a 100!
}
or maybe go with a socket for the hell of it
on $*:text:/@fortune$/iS:#: { if (!%fortuneflood) { set -u3 %fortuneflood on | if ($sock(fortune)) .sockclose fortune | .sockopen fortune www.fortunecookiemessage.com 80 | .sockmark fortune # $chr(91) $nick Here Is Your Random Fortune $chr(93) } }
on *:SOCKOPEN:fortune: { sockwrite -nt $sockname GET / HTTP/1.1 | sockwrite -nt $sockname Host: $+(www.fortunecookiemessage.com,$str($crlf,2)) }
on *:SOCKREAD:fortune: {
var %fortune | sockread %fortune
if ($regex(%fortune,/([A-z].+)<\/p>/)) { msg $sock(fortune).mark $regml(1) :Lucky Numbers: $+($r(0,20),$chr(32),$r(10,50),$chr(32),$r(30,70),$chr(32),and,$chr(32),$r(50,99).) | .sockclose fortune }
}
on $*:TEXT:/^[@.!]fortune$/Si:#:{
notice $nick $read(fortune.txt)
notice $nick Your lucky numbers are $rand(0,20) $+ , $rand(10,50) $+ , $rand(30,70) $+ , and $rand(50,99).
describe # $nick is looking at his fortune.
write fortune.txt Your words are going to bring peace to alot of people !
write fortune.txt You will find it easy to stand up and accomplish your goals !
write fortune.txt You will have to be brave and stand up !
write fortune.txt One day you will be treated like a real man!
write fortune.txt You will find new and easier ways in life!
write fortune.txt You will have lots of Good luck in the future!
write fortune.txt People love the way you are now don't change your looks or attidude!
write fortune.txt Have fun look at the bright sides even if stuff go's wrong!
write fortune.txt Your destin is to become a rich man!
write fortune.txt Life will become faster and faster as you get older, Have as much fun as you can now!
write fortune.txt Your fortune is not to good if you make the wrong choices, so make a wise and smart decision!
write fortune.txt Your fortune is bright you luck will help you in many ways!
write fortune.txt Life is not always fair but try to get the best out of it!
write fortune.txt Have as much fun as you can now, cause it will get harder when you get older!
write fortune.txt Spend time with people, cause you might not see them tomorrow!
write fortune.txt You are always being test, Make a 100!
}
Bracket mismatch - you\'re missing a closing } - you should always doublecheck and close ALL the brackets you\'re using, otherwise the script is likely to mess up. Also, I can\'t fathom why you\'ve stuck write commands in there... that\'ll eventually make the text file HUGE, since every time somebody does !fortune the script writes all those lines to txt file. Why not just instruct people to make a file named fortune.txt in their mIRC directory? Also: I know it works anyway, but try and use $read properly (it\'s $read(filename.txt), not $read filename.txt).