basic idea is I have an event that goes on for 10 minutes every 50 minutes (1hr complete loop), and everything but the extra income is set up. Ive been resorting to lazy scripting (also because I dont know much) so ive been wondering if I should just script a wait function to the ways to make money (at the moment I have 7 ways to make money) or find out how to script an extra 10% income event-thing. lmk!
#10% extra cash for event
1 messages · Page 1 of 1 (latest)
just
divide by 10
and increase all amounts gained
by taht division
most of lua is math
Coding *
I think your problem is more architectural
Anyway Good night too tired to continue
yeah, Im just trying to find out how id go about doing that
create a boolean (or a table if your doing multiple events) and if the event is active then increase by x amount
i think the problem is how are you going to make it happen every 60 mins
to apply a boost that lasts 10 mins
to each plr.
and i heavely doubt a simple ass while loop would do the job
because it also needs to apply to the server specifically
so that the timer doesn't reset everytime a plr joins
its pretty hard
really
you definirely need to ask a grade 2 scripter in this server
(red colored nametags)
a simple ass while loop would do the job.
the only hard part is syncing across all servers
but tbh, even that is easy. its only hard if you want to do arbitrary time
like random interval
wouldn't it be better to make it based on server lifetime?
os.time()%(60*60) < 10*60 such s2, many skill require
no coz then each server is at random point in the cycle, meaning you could join a server for the 10 minute boost, then join another server for an immediate extra 10 minutes in the best case. worst case is you rejoin every 50 minutes and never get the boost
oh so it'd just be rng
this guarantees all servers on the same cycle without any communication between them since clock is synced
this would require some communication most likely
easy to do random interval with communication, without comms is an interesting problem
depends on the thing you're trying to sync
can probably get away with the clock trick for rng seed if you do it right
same thing can be used for like day/night cycle, so if its night on one server, it's night on all servers at the same time guaranteed
which
what even are scripter grades
most of the "scripter" roles i see dont really know too much and try to overcomplicate simple solutions
s1 is basically a participation award up to being able to write code from scratch. beginners. s2 and above is #📜︱pro-scripting
how do you get the roles