SRL Archive - RS3 Script Requests

[gambling] how to make a dicebot


The Killer

2012-08-30 15:54:04

so I was going to make a dicebot quickly for a friend.
It would be one for a friend chat.
basically I want it to scan for someone to say !roll in friend chat and then reply [username] has rolled [a number between 1-100 (randomized)]
how would one do this?

litoris

2012-08-30 16:25:20

Nobody will help you with that if you don't know how to use pascal. If you do, going through the chat.simba file in the include will provide you with the appropriate functions to read the text(it was called FindChatBoxText), and it isn't that hard to find the typing procedures either.

The Killer

2012-08-30 16:29:25

From: litoris
Nobody will help you with that if you don't know how to use pascal. If you do, going through the chat.simba file in the include will provide you with the appropriate functions to read the text(it was called FindChatBoxText), and it isn't that hard to find the typing procedures either.

thanks. thats the type of help I was after anyway.


e: does this work?
 If (inchat('!roll')) Then 
typesend('%name% has rolled [random number]')
how would I get name and how do I get it to put in random number? I'm learning from making this so don't hate.

[XoL]

2012-08-30 18:28:33

You would have to make !roll produce a random number
Then call that number

The Killer

2012-08-31 05:34:54

From: R4nd0m
You would have to make !roll produce a random number
Then call that number


yea ik but how would one do that? fairly new to scripting.

riwu

2012-08-31 05:37:13

RandomNumber:=RandomRange(1,100).
Go read up beginners' tutorials, will be much faster than requesting functions here 1 by 1.

The Killer

2012-08-31 05:39:17

From: riwu
RandomNumber:=RandomRange(1,100).
Go read up beginners' tutorials, will be much faster than requesting functions here 1 by 1.


thanks :P