Looking to Read Random Line to change a Text File


#23

Try this:

bossAtkCommand.js (4.5 KB)

I made the base chance 9% ( says 10 in the file but w/e). If you want it 10% change the number to 11 or change it from < to <=


#24

Perfect. I’ll get working on this right away. Thank you. :smiley:


#25

So I made a command on localhost phantombot console and set the cooldown for the !bossatk command and !bossrstr command to 5 minutes (300 seconds) but users can still repeatedly type the command and affect the bot.


#26

type the command !coolcom bossatk 300 global in chat.


#27

Yup, I typed that, but it’s still not limiting commands. A user can do it as many times as they want as often as they want.


#28

Nevermind, I needed to mod enable it.


#29

I’m trying to move my system from AnkhBot over to PhantomBot, simply because the usage of what can be done in a text file is so much better. (Everyone is really happy with the way the Boss system is running). I’m wondering if you might be alright with helping me put together another of the stream systems I was using earlier? I’ll try and figure out this Java eventually, but I need some material I recognize that I can work with.

It’s a lot easier than the Boss System. It basically goes like this.

User A types !sk to challenge the Stream King. The Chat Bot then says (User A) has initiated a Stream King Challenge for (X Gil).

It then determines one of four responses:

  1. (User A) was miniaturized, then squished. (User B) remains the Stream King.
  2. (User A) has become the new Steam King! Unfortunately, Steam isn’t supported on this stream… (User B) remains the Stream King.
  3. (User A) got transformed into a frog. (User B) remains the Stream King.
  4. (User A) has defeated (User B), becoming the new Stream King!

If it’s #4, it puts User A’s name into a Text File, replacing the previous name. If it’s #1 - #3, then +1 is added to a different Text File which is called the Slain Counter and the points cost for the next person that types !sk goes up by 15.


#30

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.