Postado Julho 7, 2014 10 anos Ahh etendir vou arruma aqui pra ver se da certo tenta esse aqui: local table = { [1] = 2930, --[vocation] = id do corpse [10] = 2806, [130] = 2852, [150] = 2922, [160] = 2922, [170] = 2936, [180] = 2936, [250] = 2808, [260] = 2859, [140] = 2859, [90] = 2816, [200] = 2856, [220] = 2915, [280] = 2917, [110] = 2888, [190] = 2898 } local function transform(pos, id, voc) local item = getTileItemById(pos, id) if item and item.uid > 1 then doTransformItem(item.uid, table[voc]) doDecayItem(item.uid or 0) end end function onDeath(cid, corpse) if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid)) return true end Editado Julho 7, 2014 10 anos por CreatServer (veja o histórico de edições)
Postado Julho 7, 2014 10 anos Autor tem como colocar a tag do creature script? tou sem meu ot aq então preciso da tag :/
Postado Julho 7, 2014 10 anos <event type="death" name="Death" event="script" value="nome do arquivo.lua"/> troque o test para o nome do arquivo. em login.lua registra o evento registerCreatureEvent(cid, "Death") ver ser funcionar
Postado Julho 10, 2014 10 anos Eu vou explicar, o que eu vou manda vaii ocorre o erro. Mostra em Fotos. Quando a pessoa morrer aparece o corpse do ser humano mas quando vaii até corpse vai esta o corpse que voce colokou. mesmo como esse erro eu vou manda se vc arruma alguem que ajude. vá em data\creaturescripts\scripts e crieo arquivo com o nome corpse e cole isso dentro: local table = { [1] = 2930, --[vocation] = id do corpse [10] = 2806, [130] = 2852, [150] = 2922, [160] = 2922, [170] = 2936, [180] = 2936, [250] = 2808, [260] = 2859, [140] = 2859, [90] = 2816, [200] = 2856, [220] = 2915, [280] = 2917, [110] = 2888, [190] = 2898 } local function transform(pos, id, voc) local item = getTileItemById(pos, id) if item and item.uid > 1 then doTransformItem(item.uid, table[voc]) doDecayItem(item.uid or 0) end end function onDeath(cid, corpse) if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid)) return true end vá em data/creaturescripts/creaturescripts.xml e cole essa tag: <event type="death" name="ondeath" event="script" value="corpse.lua"/> vá em data/creaturescript/script/login e add isso registerCreatureEvent(cid, "ondeath") Ponto é isso!
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.