Does anyone know, how to make a currency exchange in T ? (code?)
I just want to have posibility to exchange rins into money, and money into rins. That's all.
Rins exchange
-
- Militia Commander
- Posts: 255
- Joined: Sat Apr 30, 2011 9:58 pm
I think he means just a strict ability to translate credits into Rins. Being able to trade credits into rins through an addition to say a Teraton or Ringer station through a slightly modified dock screen would be neat.
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
All I know is the Credit to Rin is : 5 credits to 1 Rin :Datal wrote:Does anyone know, how to make a currency exchange in T ? (code?)
I just want to have posibility to exchange rins into money, and money into rins. That's all.
Last edited by shanejfilomena on Mon Jun 06, 2011 7:55 am, edited 1 time in total.
Flying Irresponsibly In Eridani......
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
rins are just a data point stored on the player ship
so to convert credits to rins is very simple,
simple really if you want to get more complicated then you could make a fee that the ringers take
all of the code is taken form here that has the dock screens setup as well
(p.s. my code there is a bit messy sorry)
so to convert credits to rins is very simple,
Code: Select all
; get data form screen counter
(setq credits (scrGetCounter gScreen))
; do the rest for the math
(setq rin (divide credits 5))
(objIncData gPlayerShip "rins" rin)
(plyCharge gPlayer credits)
; finally tell the player what happend
(setq desc (cat " " credits " credits have been withdwarn from you account and " rin " rins have been deposited. "))
Code: Select all
; get data form screen counter
(setq credits (scrGetCounter gScreen))
; get a % fee
(setq rate (random 2 5))
(setq fee (multiply (divide credits 100) rate ))
; do the rest for the math
(setq rin (divide credits 5))
(objIncData gPlayerShip "rins" rin)
(setq total (add fee credits))
(plyCharge gPlayer total)
; tell player
(setq desc (cat " " credits " credits have been withdrawn from you account and " rin " rins have been deposited. A fee of " fee " credits was automatically removed form you account"))
(p.s. my code there is a bit messy sorry)
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
the code i posted would go in a dock screen, there are examples of the ds in the mod i linked to
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"