Ir para conteúdo

4 Pedidos


Antiemoxlr

Posts Recomendados

Ola Xtibianos eustou aki para faze 3 pedidos da versao 8.40 vamos la

 

Uma Spell De Area Para Paladinos que quando usada Move o Inimigo em 1 Sqm

Spell Arrow quando atacado move o Inimigo em 4 sqm

Spell Guard Com Animate efect

protejendo contra melee Attack's po 60 segundos exeplo a cada 20 attack's esebudo o player fala guard

exemplo 30 a 20 hitas resebidos

os 20 hits falao Guard!

 

Colocar Para Aparecer Skull Dentro da Backpack do Morto exemplo

You Reconheced Skull To name'S at level (lvl)Killed By name

 

 

 

local config = {

deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')),

sqlType = getConfigInfo('sqlType'),

maxDeathRecords = getConfigInfo('maxDeathRecords')

}

 

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)

setPlayerStorageValue(cid,5000,-1)

setPlayerStorageValue(cid,5001,-1)

setPlayerStorageValue(cid,5002,-1)

if(config.deathListEnabled == TRUE) then

local hitKillerName = "field item"

local damageKillerName = ""

if(lastHitKiller ~= FALSE) then

if(isPlayer(lastHitKiller) == TRUE) then

hitKillerName = getPlayerGUID(lastHitKiller)

else

hitKillerName = getCreatureName(lastHitKiller)

end

 

if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then

if(isPlayer(mostDamageKiller) == TRUE) then

damageKillerName = getPlayerGUID(mostDamageKiller)

else

damageKillerName = getCreatureName(mostDamageKiller)

end

end

end

 

db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")

local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")

if(rows:getID() ~= -1) then

local amount = (rows:numRows(true) - config.maxDeathRecords)

if(amount > 0) then

if(config.sqlType == "sqlite") then

for i = 1, amount do

db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")

end

else

db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")

end

end

end

end

end

Editado por Antiemoxlr
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...