Crie um arquivo chamado spear.lua, em creaturescripts/scripts, e adicione:
function onAttack(cid, target)
if isPlayer(cid) and isCreature(target) then
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == 2389 then
if getPlayerStorageValue(cid, 12432) <= 5 then
setPlayerStorageValue(cid, 12432, getPlayerStorageValue(cid, 12432) + 1)
else
doPlayerRemoveItem(cid, 2389, 1, CONST_SLOT_RIGHT)
setPlayerStorageValue(cid, 12432, 0)
doCreateItem(2389,1,getCreaturePosition(target))
end
end
if getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == 2389 then
if getPlayerStorageValue(cid, 12432) <= 5 then
setPlayerStorageValue(cid, 12432, getPlayerStorageValue(cid, 12432) + 1)
else
doPlayerRemoveItem(cid, 2389, 1, CONST_SLOT_LEFT)
setPlayerStorageValue(cid, 12432, 0)
doCreateItem(2389,1,getCreaturePosition(target))
end
end
end
end
return true
end
Em login.lua, adicione:
registerCreatureEvent(cid, "spear")
Em creaturescripts.xml, adicione:
<event type="attack" name="spear" event="script" value="spear.lua"/>
OBS: gostei desse seu pedido, mó nostalgia haha


info
Grupo: Campones
Registrado: 01/10/15
Posts: 72
Reputação: +4
Fala galerinha lembram q antigamente as spear tudo caia no chao ;D
é pois é nostalgia pura rsrsrsrs...
hj em dia a spear parece uma bala de revolver pois vo usa e ela por magia volta para a mao ou no caso nem sai de la kkkkk
minha dificuldade era descobrir como faço para que as spears nao fiquem nas maos e sim caiam no chao qndo usadas para q os players precisem correr ate la onde ela caiu para pega-las de volta.
vlw.