Scripters who know what they are doing please help

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Cody1234
Posts: 132
Joined: Thu, 23. Mar 06, 23:26
x3

Scripters who know what they are doing please help

Post by Cody1234 »

I'm making a script that makes loans that have a 30 minutes period. (Yes, I know, it needs more time)but can anyone tell me how much ms=1 second,how much ms=1 minute,and how much ms=1 hour?If so please post. :)

The layout is:

Code: Select all

Script a.Loans
Version: 0
for Script Engine Version: 25

Description
Arguments
Source Text

001   * Loan generation
002   send incoming message 'You have gotten a loan worth 500000 credits. Loan period is 30 minutes.' to player: display it=[TRUE]
003   add money to player: 500000
004   * Loan period time
005 @ = wait 300000 ms
006   * Loan payback
007   send incoming message 'Loan period expired.' to player: display it=[TRUE]
008   add money to player: -500000
009   return null
[ external image ]
Shoop+Space=Win
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

its easy enough to work out, ms is milleseconds
theres 1000 ms in a second.

also not, that wait statements aern't acurate timing methods, there used mainly to break up the code with interupts, not for timing.

30 mins, will be 30 * 60 * 1000 = 180000
Cody1234
Posts: 132
Joined: Thu, 23. Mar 06, 23:26
x3

Post by Cody1234 »

Do you know a alternate way of putting a time maker? Thanks Cycrow :wink:
[ external image ]
Shoop+Space=Win
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22438
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

it really depends how you want to go about the script, If you dont want it to be perfectly accurate, then a wait is fine.

and for something like this i dont c y it needs to be perfectly accurate.

2 other ways is to use an AL plugin which has a timer you can set. And a script is run at each interval of the timer.

or you could use the game time
Cody1234
Posts: 132
Joined: Thu, 23. Mar 06, 23:26
x3

Post by Cody1234 »

Thanks Cycrow! :)
[ external image ]
Shoop+Space=Win

Return to “X²: The Threat - Scripts and Modding”