Bouny Hunter
PVP
So my folowing problem is that, people dying and ain't loosing any mlvl, lvl or skills.
Please do not come with changing deathlostpercent in config.lua or something like that. I have tried it out and it ain't working. I also tried to change it in phpadmin database but it ain't working aswell:
example which i tried:
So I'm realy exhausted now of trying to fix it and need the help of you guys <3
Maybe any Problem inside this script? Please check it out.
Please do not come with changing deathlostpercent in config.lua or something like that. I have tried it out and it ain't working. I also tried to change it in phpadmin database but it ain't working aswell:
example which i tried:
Code:
UPDATE `Players` SET `loss_skills` = 10
So I'm realy exhausted now of trying to fix it and need the help of you guys <3
Maybe any Problem inside this script? Please check it out.
local config = {
loginMessage = getConfigValue('loginMessage')
}
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
local auction = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")
if(auction:getDataInt("auction_balance") > 0) then
doPlayerAddMoney(cid, auction:getDataInt("auction_balance"))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You sold item on auction, you get " .. auction:getDataInt("auction_balance") .. " gps.")
db.executeQuery("UPDATE `players` SET `auction_balance` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
auction:free()
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "WarAttack")
registerCreatureEvent(cid, "WarKill")
registerCreatureEvent(cid, "advance")
return true
end