• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua setGlobalStorageValue

Evan

A splendid one to behold
Senator
Premium User
Joined
May 6, 2009
Messages
7,018
Solutions
1
Reaction score
1,040
Location
United States
Can someone give me the full explanation of this function?
Like, what are the values? setGlobalStorageValue(???).
Also, what does it do?
 
So, you wanna know what is a GlobalStorageValue? Or you wanna know how to use that function?

A global storage value is a global one(diferent from storage value, that each player has 1), in other words, this value is for every player on the server, or every item, and so on..

I will give you an example,

You are hunting some rats, okay, 5 exp each one... but there is a global quest, that when the players of the server do, make the exp 2 times faster(set a GLOBAL STORAGE VALUE). When they complete the quest, for example, it gives a global storage value..
When you kill that rat, it will check if this global storage is true or false, if its true, the rat gives 10 exp, else do nothing...
This function is usefull when many things(monsters,players,items) will be affected by the script.

This storage isn't saved in the players storage, but in the SERVER storages.

Also remember, in config.lua you have the option to save the globalstorages or not ( if not, when you restart the server, all global storages will be lost)

So you can check it with getGlobalStorageValue(5000) <= 1 (or whatever you want) for example, it check if this global value is on or off and apply the parameters to everyone on the server
 
Last edited:
Back
Top