Padrão de Postagem:
Autor: Lyu Elite Versão: 8.40 Testado: TFS 0.3.3 Tipo: TalkAction
Função: Esse comando serve para retirar o Red Skull de um player, é fácil de se fazer.
Vá em data/talkaction/script depois crie um arquivo .lua chamado removeskull.lua e lá adicione está tag:
local COST = 20 local effect = CONST_ME_YELLOW_RINGS function onSay(cid, words, param, channel) if getCreatureSkullType(cid) == SKULL_RED then local query = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. ";") local points = query:getDataInt("premium_points") if points >= COST then local update = db.executeQuery("UPDATE `accounts` SET `premium_points`= "..(points - COST).." WHERE `id`= " .. getPlayerAccountId(cid) .. "; ") if (update == true) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your red skull has been taken off!\nRemaining premium points: " .. (points - COST)) doCreatureSetSkullType(cid, SKULL_NONE) doSendMagicEffect(getPlayerPosition(cid), effect) else doPlayerSendCancel(cid, "Database error") end else doPlayerSendCancel(cid, "You need " ..COST.. " premium points to remove red skull") end else doPlayerSendCancel(cid, "You do not have red skull") end query:free() return TRUE end
Agora vá em data/talkaction/talkaction.xml e adicione está tag:
<talkaction words="!removeskull" event="script" value="removeskull.lua"/>
Pronto !!! Script bacana, rápido e fácil. Espero que tenham gostado
Créditos: Lyu Elite