Postado Julho 10, 2015 9 anos Como fasso para aparecer um effect quando um player dropa certo items ? Exenplo: vc dropa uma fire stone aparece uma seta vermelha em cima do corpo do monstro q dropo Tipo pxg
Postado Julho 10, 2015 9 anos local effect = 222 --Efeito drop stone local arrow = {222, 20} --Respectivamente, efeito e duração (segundos). local items = {2283, 2284, 2280, 2290, 2286, 2285, 2281, 2288, 2287, 2278, 2289, 2276, 2277, ...} --Tabela para configurar os items. (ID DOS ITEMS RAROS) function sendEffect(pos, time) if time < 0 then return true end doSendMagicEffect(pos, arrow[1]) addEvent(sendEffect, 1000, pos, time - 1) end local function func(cid, position, corpseid, effect) if not isCreature(cid) then return true end local corpse = getTileItemById(position, corpseid).uid if corpse <= 1 then return end if not isContainer(corpse) then return true end for slot = 0, (getContainerSize(corpse)-1) do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return end if isInArray(items, item.itemid) then return doSendMagicEffect(getThingPos(cid), effect) and sendEffect(position, arrow[2]) end end end function onKill(cid, target, lastHit) if not isMonster(target) then return true end local corpse = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(func, 5, getCreatureSummons(cid)[1], getThingPos(target), corpse, effect) return true end No login.lua poe: registerCreatureEvent(cid, "dropStone") No Creaturescripts.xml registra: <event type="kill" name="dropStone" script="dropstone.lua"/> Pokemon Imperium Project! - Lordbaxx im back -
Postado Julho 14, 2015 9 anos Autor Mano tipo eu fiz tudo certin mais na hora q eu mato o monstro (ex:wolf) n aconteçe nada so da o loot normal n aparece o effect em cima do corpo e ja mudei o numero do effect no script ja Editado Julho 15, 2015 9 anos por mixnaruto (veja o histórico de edições)
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.