Rins exchange

A place to discuss mods in development and concepts for new mods.
Post Reply
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

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. :shock:
Chase
Militia Commander
Militia Commander
Posts: 298
Joined: Sat Feb 19, 2011 5:56 am
Location: In a Lancaster. Nope. A box.

Sorry to blow out your candle. But there is already a mod for that. Called ares rins to credits. Found on xelerus
Faaz los frul, moro los mafaeraak. Chicks osgor skein. c:
Amariithynar
Militia Commander
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.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

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. :shock:
All I know is the Credit to Rin is : 5 credits to 1 Rin :
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..
sdw195
Militia Captain
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,

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. "))
simple really if you want to get more complicated then you could make a fee that the ringers take :D

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"))
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)
Image
Image
Image
Image
"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"
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

No my friends, I'm not a code master... I need ready code ! Where I need to paste this ?

<Globals>
/--------code------/
</Globals> ?????
Where?
sdw195
Militia Captain
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
Image
Image
Image
Image
"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"
Post Reply