Author Topic: pulling @randomuser@ & @rand@[1|100] from another command  (Read 2371 times)

0 Members and 1 Guest are viewing this topic.

marzuco

  • Youngling
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
  • Twitch Name: marzuco
pulling @randomuser@ & @rand@[1|100] from another command
« on: August 30, 2016, 05:56:23 AM »
I've seen this done so I know it can be, how ever I can't get the person who did it to respond so I resort to asking here.

I'm trying to pull the values the bot gives @randomuser@ & @rand@ from another command. I've tried doing @lookupinfo@ & either I'm doing it wrong or that's not the correct way.

Thank you in advance.

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #1 on: August 30, 2016, 06:01:38 AM »
Would need to use @savefile@ to save the @randomuser@. Easiest way. :o
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

marzuco

  • Youngling
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
  • Twitch Name: marzuco
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #2 on: August 30, 2016, 06:10:27 AM »
um.. no, it can work w/o that. anyone else

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #3 on: August 30, 2016, 06:34:43 AM »
um.. no, it can work w/o that. anyone else

Depending on how you have it setup, you can probably chain !command2 @randomuser@, and in the second command use @target@[1].

Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Dante557

  • Advisor
  • Councilor
  • **
  • Posts: 555
  • Karma: +26/-0
  • Sometimes Helpful, Sometimes Not :D
    • View Profile
    • My Twitch Page
  • Twitch Name: Dante557
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #4 on: August 30, 2016, 06:36:04 AM »
If you're passing @randomuser@ between multiple commands the second command would need to use @target@ instead. The same would apply with any variables you're passing through

Code: [Select]
!test - !test2 @randomuser@
!test2 - Here is the random user selected @target@[1]
If you need to get through to me you can try to contact me on Twitter @ http://www.twitter.com/dante556

marzuco

  • Youngling
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
  • Twitch Name: marzuco
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #5 on: August 30, 2016, 07:46:12 AM »
ok I got the user part working, but still not sure how to get the same @rand@[1|100] value to pull through. Here is what I got.

!random
!add @rand@[1|100] @randomuser@ @exec@[0,!plus @randomuser@

then !plus
@target@ has won @rand@[1|100]

Dante557

  • Advisor
  • Councilor
  • **
  • Posts: 555
  • Karma: +26/-0
  • Sometimes Helpful, Sometimes Not :D
    • View Profile
    • My Twitch Page
  • Twitch Name: Dante557
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #6 on: August 30, 2016, 07:51:30 AM »
Code: [Select]
!random - !add @rand@[1|100] @randomuser@ @exec@[0,!plus @randomuser@ @rand[1|100]]
!plus - @target@[1] has won @target@[2]
If you need to get through to me you can try to contact me on Twitter @ http://www.twitter.com/dante556

marzuco

  • Youngling
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
  • Twitch Name: marzuco
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #7 on: November 29, 2016, 08:57:42 PM »
This works perfectly when I test on my streamer or mod accounts, but not for my non mod accounts. Please assist. TY

!hopping
@randomuser@ made a safe landing & earned some treats. @exec@[1,!plus @rand@[10|75] @randomuser@]
@randomuser@ landed poorly & lost some treats. @exec@[1,!loss @rand@[10|75] @randomuser@]
@randomuser@ ran away from home & was lost. @exec@[1,!timeout @randomuser@]

!plus
!add @rand@[10|75] @target@[2]

!loss
!remove @rand@[10|75] @target@[2]

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: pulling @randomuser@ & @rand@[1|100] from another command
« Reply #8 on: November 30, 2016, 12:09:47 AM »
 You need to set the commands to "Run As" "User (Elevated Access)"
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport