Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
[28/07/2015 13:44:23] [Error - CreatureScript Interface] 
[28/07/2015 13:44:23] data/creaturescripts/scripts/GuildFragsKill.lua:onKill
[28/07/2015 13:44:23] Description: 
[28/07/2015 13:44:23] data/creaturescripts/scripts/GuildFragsKill.lua:4: attempt to call global 'addFragsByGuild' (a nil value)
[28/07/2015 13:44:23] stack traceback:
 
Aparece isso na distro..Acon
tece quando um player ataca o outro e esse outro fica com 0 de life e nao morre, o xar fica bugado...
oq pode ser? oq tenho q fazer?
  • Respostas 6
  • Visualizações 432
  • Created
  • Última resposta

Top Posters In This Topic

Postado
Provavelmente algum prepareDeath está no return false e não heala o player.
 
Se não for essa função é algo parecido.

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado
  • Autor

minha GuildFragsKill.lua ta assim

function onKill(cid, target, lastHit)
local config = {MaxDifLevel = 50, MyGuild = getPlayerGuildName(cid)}
if isPlayer(cid) and isPlayer(target) and HaveGuild(cid) and HaveGuild(target) and getPlayerGuildId(cid) ~= getPlayerGuildId(target) and getPlayerIp(target) ~= getPlayerIp(cid) and math.abs(getPlayerLevel(cid) - getPlayerLevel(target)) <= config.MaxDifLevel and getGlobalStorageValue(frag_guild.start_frags) <= 0 then
addFragsByGuild(config.MyGuild,frag_guild.FragsPerKill)
doBroadCastGuild(config.MyGuild,20,'[Guild Frag System] Your guild received '..frag_guild.FragsPerKill..' frag because have killed a player another guild, now your guild have '..getFragsByGuild(config.MyGuild)..' frags')
if getFragsByGuild(config.MyGuild) >= frag_guild.FragsToWinAcess then
addAcess(config.MyGuild, frag_guild.AcessTimeDays)
addHonorPoints(config.MyGuild, frag_guild.Honor_Point)
doBroadcastMessage("[Guild Frag System]\nThe guild ["..config.MyGuild.."] is dominant for having achieved "..frag_guild.FragsToWinAcess.." Frags!\nYour domain ends in "..getAcessDate(config.MyGuild))
cleanGuildFrags()
setGlobalStorageValue(frag_guild.start_frags, 1)
if frag_guild.MoreExpToGuild == true then
  local players = {}
for _, cid in pairs(getPlayersOnline()) do
if getPlayerGuildName(cid) == config.MyGuild then
table.insert(players, cid)
end
  end
  for i = 1, #players do
  doPlayerSetExperienceRate(players[i], frag_guild.Exp_Rate)
  end
end
end
end
return TRUE
end

preparedeath.lua 

estao asssim

 

-- Sebasbe and Nicekid --
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if (getPlayerSlotItem(cid, 2).itemid == 7890) and getPlayerSkullType(cid) >= 0 then
doPlayerRemoveItem(cid, 7890, 1)
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
return TRUE
end
end
return TRUE
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo