`````` ```function onSay(cid, words, param) checkExhausted(cid, 1000, 5) -- zawed el line da ta7t kol function onSay local t = split(param, ',') if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Command param required.") return true end if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Enter msg with other player name.") return true end local pid = getPlayerByNameWildcard(t[1]) local pidd = getPlayerByNameWildcard(t[2]) local Info = db.getResult("SELECT `id`, `level` FROM `players` WHERE `name` = '".. t[1] .."' LIMIT 1;") if(Info:getID() == -1) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Player " .. t[1] .. " not found.") return true end local id = Info:getDataInt("id") local level = Info:getDataInt("level") Info:free() local config = { talents = { {4595}, {25091}, {25092}, {25093} } } if(pid) then doRemoveCreature(pid, true) end doBroadcastMessage("".. getCreatureName(cid) .." has demoted " .. t[1] .. " [".. level .."] with comment: \"" .. t[2] .. "\"", MESSAGE_EVENT_ORANGE) db.executeQuery("UPDATE `players` SET `blessings` = 0, `level` = 8, `manaspent` = 0, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';") db.executeQuery("UPDATE `player_storage` SET `value` = 2 WHERE `player_id` = '".. id .."' AND `key` = 85989;") db.executeQuery("UPDATE `player_storage` SET `value` = 2 WHERE `player_id` = '".. id .."' AND `key` = 90901;") db.executeQuery("UPDATE `player_storage` SET `value` = 1 WHERE `player_id` = '".. id .."' AND `key` = 88953;") for _, talents in pairs(config.talents) do db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `player_id` = '".. id .."' AND `key` = '".. talents[1] .."';") end for i = 1, 50 do local amount = 15511 + i db.executeQuery("UPDATE `player_storage` SET `value` = -1 WHERE `player_id` = '".. id .."' AND `key` = '".. amount .."';") end return true end```