Deep Bot - Twitch Streamer Assistant

Deep Bot => Help/Support => Topic started by: WasabiIceCream on February 08, 2016, 04:04:52 AM

Title: Help With a Custom Command
Post by: WasabiIceCream on February 08, 2016, 04:04:52 AM
Hey, wondering if anyone could help me out with a custom command I've been wanting to do.
I've been trying to work with the limitations of the bot's custom variables with no luck so far.
What I want is a command that users can run, spending points to redeem a random Steam/PSN/XBL game product key that I have stored in a Text file, or multiple text files.

Haven't been able to get things working, though. Tried storing info in a file "##.txt", and using the random variable to generate the name of the text file "3.txt", but the Random variable doesn't seem to work inside the Read File variable "@readfile@[PathToFile\@rand@[0|10].txt]".

I tried some other stuff, with no results. Any suggestions?
Title: Re: Help With a Custom Command
Post by: TheNumbLock on February 08, 2016, 04:33:21 AM
Works for me:

(http://puu.sh/mZvlX/2e7eb33842.png)

Command:

(http://puu.sh/mZvrj/31d4185306.png)

Text Files located in the Custom logs folder of the Deepbot folder (C:\DeepBot - Twitch Streamer Assistant\custom logs):

(http://puu.sh/mZvuX/abef3d03f5.png)
Title: Re: Help With a Custom Command
Post by: MercurY3rd on February 08, 2016, 04:38:26 AM
it seems to work, maybe you named the text files wrong?
http://mercury3rd.tv/uploads/2016-02-07-2133-54.mp4 (http://mercury3rd.tv/uploads/2016-02-07-2133-54.mp4)
Title: Re: Help With a Custom Command
Post by: WasabiIceCream on February 08, 2016, 04:44:59 AM
Strange, I'll have to give it another shot.
Maybe I screwed something up.
Title: Re: Help With a Custom Command
Post by: WasabiIceCream on February 09, 2016, 05:58:22 AM
EDIT: Or, scratch that... I'm an idiot
Title: Re: Help With a Custom Command
Post by: TheNumbLock on February 09, 2016, 06:26:23 AM
EDIT: Or, scratch that... I'm an idiot

Did you figure it out?
Title: Re: Help With a Custom Command
Post by: WasabiIceCream on February 09, 2016, 06:57:23 AM
Yeah, the only thing I want to solve now is preventing users from using commands in the middle of the command chain.
Like, if they use the "!buy3" command, they'll bypass the points and availability checks from the commands in the previous chain.
Setting the access control higher prevents the commands from being executed at all.
Title: Re: Help With a Custom Command
Post by: TheNumbLock on February 09, 2016, 07:33:41 AM
Yeah, the only thing I want to solve now is preventing users from using commands in the middle of the command chain.
Like, if they use the "!buy3" command, they'll bypass the points and availability checks from the commands in the previous chain.
Setting the access control higher prevents the commands from being executed at all.

That is why you check mark hide from command list

(http://puu.sh/n0TSN/7cb3bb066c.png)
Title: Re: Help With a Custom Command
Post by: WasabiIceCream on February 09, 2016, 09:50:57 AM
Ah, cool gotcha.
Didn't know exactly what that option meant.

I've got it all working now.
If anyone wants the code, or wants to double-check it for logic errors, you can just ask.
Could probably be done much more efficiently than what I've done, but it works.
Thanks again.