KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 07:40 PM |
just tickets and robux, my game is going to have currency that they can switch. I want it JUST like trade currency, once they use it rate goes down/up.
So um, code below plz.
|
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 29 Sep 2015 07:49 PM |
no
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
frriend
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 577 |
|
|
| 29 Sep 2015 07:50 PM |
"So um, code please"
Yea, how about you visit the wiki and figure it out. Thanks. |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 07:51 PM |
Here's a tip:
Use a bit of division to get the average |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 07:53 PM |
all right smart guy, Ill make something for u to start off of.
local baseCurrency = "Tickets"
local rate = 5;--5 tickets for one robux
Exchange(type, Offer) local wantedCurrency = ""; if type == "Tickets" then wantedCurrency = "Robux" else wantedCurrency = "Tickets" end for i = 0, rate, Offer do RObux = Robux +1 end rate = rate + 1 end
srhug |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 07:55 PM |
Please no one answer this snotty-nosed ten year old who thinks we're his programming slaves
Instance.new("BodyThrust" , Illegallyblind.Pelvis) |
|
|
| Report Abuse |
|
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
|
| 29 Sep 2015 07:57 PM |
exchange(type, amount) --set type to 1 for tickets, 0 for robux if type == 1 then amount = math.floor(amount / 20) return amount elseif type == 0 then amount = math.floor(amount * 20) return amount end
ex = exchange(1, 40) --should return 2
what siggy |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 07:59 PM |
| never use for-loops for the end value if it is user input, it can easily crash a player |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 08:07 PM |
thanks isc, thats kinda like mine :)
Also how do i change it after they di it, like trade currency
so it would be instead of 20
rate = 20
and it could change ya know |
|
|
| Report Abuse |
|
|
isc88
|
  |
| Joined: 30 May 2013 |
| Total Posts: 27545 |
|
|
| 29 Sep 2015 08:10 PM |
just make a value in a folder
put a script in it that incriments it every so often
and use the value's value instead of 20
what siggy |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 08:11 PM |
| it isnt random, it does it somehow |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 08:58 PM |
| looks like a job for cntkillme |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 09:00 PM |
| well what you can do is use http and find a api that can deal with returning the exchange rates and that would work the best |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 29 Sep 2015 09:01 PM |
| It determines a price based off of the quantity and demand. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 09:05 PM |
| legendary, i dont have a server, but DataStore will work fine. Morash, how do i find that |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 29 Sep 2015 09:06 PM |
| The number of a currency put into the exchange system and the number of a currency being asked for from the system. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 09:07 PM |
morash could you type up the math to determine it.
btw in my game when the currency first starts, 5 tix = one robux |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 29 Sep 2015 09:09 PM |
Demand/quantity
High demand leads to higher price, higher quantity leads to lower price. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 29 Sep 2015 09:11 PM |
ok, but by how much?
.1 per 100 tickets? |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 09:21 PM |
| youdo not need a server, you can get the raw data from the trade currancy page with a basic rproxy.pw/address and find the correct data you want which is 18.3224/18.23411 and then seperate them for the real tix/robux rate |
|
|
| Report Abuse |
|
|
| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|