"!rsfact" Runescape Fact command for a bot

By Bielie on Apr 21, 2010

I kinda tweaked a earlier post of someone.

You can find here: http://www.hawkee.com/snippet/2714/

The script works like:

!rsfact
--Did you know that: ~~?

!addfact [people on the same network only]

--Adding fact to the list, Please wait.....
--Succesfully added the requested rsfact to the list.

I also added floodcontrols, the @rsfact command to make it public & some timers that will make the command look cooler.

Type:

/write rsfact.txt
/run rsfact.txt

Open this link and copy and paste this to it and save it:

http://www.pastebin.org/164652

on *:text:!rsfact*:#: { 

var %rsfact = $read(rsfact.txt)

if ( %rsfact == $null ) { 
  if ($(,$+(%,flood1,$nick))) { return }
    set -u3 $+(%,flood1,$nick)
notice $nick Error: Unable to find a fact, try again later
return
}

else {
if ($(,$+(%,flood,$nick))) { return }
notice $nick Did you know that: %rsfact ?
.timer 1 2 notice $nick Want another rsfact? Type !rsfact again!
      set -u3 $+(%,flood,$nick)
 return
}

on *:text:@rsfact*:#: { 

var %rsfact1 = $read(rsfact.txt)

if ( %rsfact1 == $null ) { return }
  if ($(,$+(%,flood4,$nick))) {
    set -u3 $+(%,flood4,$nick)
notice $nick Error: Unable to find a fact, try again later
return
}

else {
if ($(,$+(%,flood6,$nick))) { return }
msg $chan Did you know that: %rsfact1 ?
.timer 1 2 notice $nick Want another rsfact? Type !rsfact again!
      set -u3 $+(%,flood6,$nick)
 return
}

on *:text:!addfact*:#: {
if ($address($nick,2) != $address($me,2)) { notice $nick You are not a moderator, so you cant use this command. | return }
}

else {
notice $nick Adding fact to the list, Please wait....
/write rsfact.txt $2-
.timer 1 2 notice $nick Succesfully added the requested rsfact to the list.
return
 } 
}

Comments

Sign in to comment.
Kerli   -  Apr 22, 2010

Maybe you should make them at home, or at least test them at home before posting them.

 Respond  
Bielie   -  Apr 22, 2010

IKR, i realy cant. My computer on school doesnt allow me :(

 Respond  
napa182   -  Apr 21, 2010

Bielie please test ur snippets before you post them.

 Respond  
Kerli   -  Apr 21, 2010

It's almost functional. I see bracket errors. Have you tested it?

Also, I noticed that you make a lot of simple $read snippets. You should try something a little different to expand your knowledge. At least try something completely original, even if you have to ask for help. ;D

 Respond  
WorldDMT   -  Apr 21, 2010

lacks several "}"

why do you post 2 same code ?

if (!$(,$+(%,flood,$nick))) { return } ??
do u mean
if ($(,$+(%,flood,$nick))) { return } u have to remove "!"

write $2- rsfact.txt the syntax is wrong
/help /write
/write file text so that most be /write rsfact.txt $2-

P.S: test befor posting...

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.