Ir para conteúdo

Featured Replies

Postado
  • Autor

 

galera.. pelo amor de deus: "FALSE" e "TRUE" não existem... o correto é "false" e "true". Segundo que o script que o cara passou é onDeath e não onPrepareDeath.

 

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) and isPlayer(lastHitKiller) and getPlayerSlotItem(cid, 2).itemid == 2173 then
doCreatureSetDropLoot(cid, false)
doRemoveItem(cid, 2173)
elseif isPlayer(cid) and isMonster(lastHitKiller) and getPlayerSlotItem(cid, 2).itemid == 2173 then
doCreatureSetDropLoot(cid, false)
end
return true 
end

não funfo ainda ta sumindo colar e os itens quando morre para algun bixo e players :c ajuda ai pff preciso colocar esse sistema no meu ot :(

I like

  • Respostas 21
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

Você instalou o script corretamente?

Você deve configurar em creaturescripts.xml e em login.lua, que fica dentro de scripts.

me passa as tags certinhas para eu ver ?

I like

Postado

em data/creaturescripts/creaturescripts.xml adicione essa tag:

<event type="PrepareDeath" name="aoler" event="script" value="foreveraol2.lua"/>

O seu script deve estar com o nome: foreverao12

 

 

Vá em data/creaturescripts/scripts. abra o arquivo login.lua e em baixo de uma tag parecida com essa:

registerCreatureEvent(cid, "Mail")

Adicione em baixo:

registerCreatureEvent(cid, "aoler")

Seu login.lua vai ficar mais ou menos assim:

 

local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}


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


registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")


registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end


registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "aoler")
return true
end

Esse é o meu, não use-o pois vai bugar.

 


 

Se o erro não é no script é só seguir estes passos que irá funcionar.

Postado
  • Autor

 

em data/creaturescripts/creaturescripts.xml adicione essa tag:

<event type="PrepareDeath" name="aoler" event="script" value="foreveraol2.lua"/>

O seu script deve estar com o nome: foreverao12

 

 

Vá em data/creaturescripts/scripts. abra o arquivo login.lua e em baixo de uma tag parecida com essa:

registerCreatureEvent(cid, "Mail")

Adicione em baixo:

registerCreatureEvent(cid, "aoler")

Seu login.lua vai ficar mais ou menos assim:

 

local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}


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


registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")


registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end


registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "aoler")
return true
end

Esse é o meu, não use-o pois vai bugar.

 


 

Se o erro não é no script é só seguir estes passos que irá funcionar.

 

aol ta sumindo. tentei colocar outra id de outro colar mais só colar que n dropa :(

aol continua sumindo :(

I like

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