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

How to set my characters to --> "read only" on a sql database

kird

New Member
Joined
Jul 3, 2010
Messages
78
Reaction score
1
I'm trying to set up a war server in which all players will start at lvl 100 and when they die, the go back to lvl 100.

few years ago i only activated the "read only" check box on my player files, but since im useing a sql database now, and there no players files, i dont know how to make this posible.

So, how can i do, so the characters dont save when they die?

Thnx in advance
Yours~
kird
 
Create an archive .lua in scripts folder of creaturescripts called levelrebalance.lua and put this:
Code:
function onLogin(cid)
local rebalanceStor = getPlayerStorageValue(cid, 37454)

	if rebalanceStor == -1 and getPlayerLevel(cid) >= 140 then
        doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
	setPlayerStorageValue(cid, 37454, 1)

	elseif rebalanceStor == -1 and getPlayerLevel(cid) > 125 and getPlayerLevel(cid) < 130 then
	doPlayerAddExperience(cid, (getExperienceForLevel(125) - getPlayerExperience(cid)))
	setPlayerStorageValue(cid, 37454, 1)

	elseif rebalanceStor == -1 and getPlayerLevel(cid) < 120 then
	doPlayerAddExperience(cid, (getExperienceForLevel(120) - getPlayerExperience(cid)))
	setPlayerStorageValue(cid, 37454, 1)
	
	else setPlayerStorageValue(cid, 37454, 1)

end
return TRUE
end
 
Thnx for the reply, but this is not what im looking for.

I want to reset all the equipment (runes, potions, etc..) so everytime a player dies, he'll get the lvl and all the supplies back, also all the storage values for the quests will be set up to 0.
In other words the character will be the same everytime the player logs in or dies.


Thnx anyway for the reply

Yours~
Kird
 
Back
Top