ond
Veteran OT User
I wonder if someone can see if there's something wrong with my script. It don't work, nor it gives me any errors:
Edit: Just like Cykotitan mentions, Avesta lacks db. functions. If you still are using Avesta you can just set the value to zero. It doesn't have to erase.
If you're using newer server, such as OTServ_SVN, you can use erasePlayerStorageValue(cid, key)
Code:
function onDie(cid, corpse)
if getPlayerLossPercent(cid, loss_experience) < 8 then
for i = 0, 3 do
getPlayerLossPercent(cid, i)
doPlayerSetLossPercent(cid, i, 8)
end
db.execute('DELETE FROM `player_storage` WHERE `player_id` = ' .. getPlayerGUID(cid) .. ' AND `key` >= 7777 AND `key` <= 7782;')
end
end
Edit: Just like Cykotitan mentions, Avesta lacks db. functions. If you still are using Avesta you can just set the value to zero. It doesn't have to erase.
If you're using newer server, such as OTServ_SVN, you can use erasePlayerStorageValue(cid, key)
Last edited: