Hello Guest

Variable Name for the current dice site

  • 4 Replies
  • 1566 Views
*

Alan1995

  • **
  • 5
  • +0/-0
    • View Profile
Variable Name for the current dice site
« on: December 26, 2018, 03:34:04 pm »

I need to use the "Dicebot variable" containing the name of the current dice site (the dice site that is selected as active in the "Site (CG) menu) in my script in programmer mode in order to set specific parameters depending on the active/selected site.

I tried to check for this variable name in the tutorial and the other Dicebot documentation without success.

Can you please indicate me what is the "name of this variable" (current dice site) and its type (string, etc.)?

Thank you in advance

Alan


*

Seuntjie

  • *****
  • 211
  • +0/-1
    • View Profile
Re: Variable Name for the current dice site
« Reply #1 on: December 26, 2018, 04:50:06 pm »
You can use the 'site' variable (it might be Site, just check the casing in the variable box in the programmer mode)

You can find the class definition on https://github.com/Seuntjie900/DiceBot/blob/master/DiceBot/cDiceBot.cs#L5817

You can use any of the properties up to line 5833 in the programmer mode.

*

Alan1995

  • **
  • 5
  • +0/-0
    • View Profile
Re: Variable Name for the current dice site
« Reply #2 on: December 26, 2018, 06:58:05 pm »
I got it!! Thank you for your help.

The variable for the current site name is:  site.name  (all lowercase).

I checked also (and tested as script) for the other variables linked to the status of the current site and I put here below the variable names for use of other users (since these variables seems not to be included in the  "Variables Box" of Dicebot/Programmer mode):

==== Current Site Name =========
site.name
print(tostring(site.name) .. "  site (site)")  -- for printing its value

==== Current Site Edge ========
site.edge
print(tostring(site.edge) .. "  edge (edge)")  -- for printing its value

==== Current Site maxRoll ========
site.maxroll
print(tostring(site.maxroll) .. "  maxroll (maxRoll)")  -- for printing its value

==== Current Site Tip ========           
site.tip
print(tostring(site.tip) .. "  tip (Tip)")  -- for printing its value

==== Current Site Tip Using Name ========
site.tipusingname
print(tostring(site.tipusingname) .. "  tipusingname (TipUsingName)")  -- for printing its value

==== Current Site AutoWithdraw  ========
site.canwithdraw
print(tostring(site.canwithdraw) .. "  canwithdraw (AutoWithdraw)")  -- for printing its value

==== Current Site ChangeSeed  ========
site.canresetseed
print(tostring(site.canresetseed) .. "  changeseed (ChangeSeed)")  -- for printing its value

==== Current Site AutoInvest  ========
site.caninvest
print(tostring(site.caninvest) .. "  caninvest (AutoInvest)")   -- for printing its value

==== Current URL Site ========
site.siteurl
print(tostring(site.siteurl) .. "  siteurl (SiteURL)")  -- for printing its value


Thank you

Alan

*

Seuntjie

  • *****
  • 211
  • +0/-1
    • View Profile
Re: Variable Name for the current dice site
« Reply #3 on: December 26, 2018, 08:31:22 pm »
The variable site is referenced, but each property is not because they are not individual variables, they are properties of a variable. The same with the lastBet variable. It is listed, but it's properties are not (the UML for the bet class can be found on https://bot.seuntjie.com/programmermode.aspx).

But thank you for posting the list.

*

MrOnsTr

  • **
  • 24
  • +1/-0
    • View Profile
Re: Variable Name for the current dice site
« Reply #4 on: January 01, 2019, 04:54:00 am »
Thanks for this post i need it!  :D