• 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!

[GlobalEvents] At 23:59 add ALL players stroage

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello,
i looking for a script, at 23:59 add ALL players stroage 2423,1.

I try bud i dont know how to set this :(

Someone can help me?
 
#up
Change the time for like, in 5 mins..
then change your script for this.
look in console when it has to be executed. (The time u set on globalevents)
if u see the mensage it worked.

LUA:
function onTimer()
	db.executeQuery('INSERT IGNORE INTO `player_storage` SELECT `id`, 2423, 1 FROM `players` ON DUPLICATE KEY UPDATE `value` = 1')
        print('If u see this on console it had been executed')
	return true
end
 
Yes i see this in console, but not change a stroage :(


@edit
yes it works, but you must be logout to add stroage.

Can someone add to a script, online players add this stroage too?
 
Last edited:
LUA:
function onTimer()
	db.executeQuery('INSERT IGNORE INTO `player_storage` SELECT `id`, 2423, 1 FROM `players` WHERE `online` = 0 ON DUPLICATE KEY UPDATE `value` = 1')
	local a = getPlayersOnline()
	for b = 1, #a do
		doCreatureSetStorage(a[b], 2423, 1)
	end
	return true
end
 
Back
Top