Ir para conteúdo
Banner com Efeitos

Oneda

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Oneda recebeu reputação de LeoTK em Skin em criaturas vivas.   
    Salve carai! Então, tenho estudado um pouco de lua e acabei fazendo um script, simples, mas que pode vir a ser útil para alguns servidores...
     
    O que o script faz? É simples, ele te deixa tirar a "pele" de um animal ainda vivo, como a obsidian knife faz com os mortos.
    PS: Você pode configurar os mobs e suas respectivas "peles" no script, você só precisar tem um mínimo de conhecimento em lua.
    PS²: Script feito em um TFS 1.2 recém baixado.
     
    actions.xml: (PS: Não esqueça de definir o ID do item a ser usado)
    <action itemid="ID DO ITEM" script="skinning.lua" />  
    Observação: A Sintaxe em lua nos codes do fórum está aparentemente bugada, apenas copie o código abaixo e cole no seu editor lua que ficará normal.
     
    actions/scripts/skinning.lua:
    local wool = {"Sheep", "Black Sheep"} -- Creatures configuration for the first table which gives wool when skinned local leather = {"Deer", "Bear", "Rat"} -- Creatures configuration for the second table which gives minotaur leather when skinned (Should probably rename the item to leather by the way) local dleather = {"Dragon", "Wyvern"} -- Creatures configuration for the third table which gives green dragon leather when skinned (Could also change this to green leather or something) local tPos = getCreaturePosition(target) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if isCreature(target) and isInArray(wool, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(11236, 3) -- Item which will be added when the mobs at "Wool" table are skinned and its amount. doCreatureAddHealth(target, -10) elseif isCreature(target) and isInArray(leather, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(5878, 1) -- Item which will be added when the mobs at "Leather" table are skinned and its amount. doCreatureAddHealth(target, -20) elseif isCreature(target) and isInArray(dleather, getCreatureName(target)) then doSendMagicEffect(tPos, 1) -- The magic effect that will be shown @ target's position when skinned. player:addItem(5877, 1) -- Item which will be added when the mobs at "DLeather" table are skinned and its amount. doCreatureAddHealth(target, -50) elseif isCreature(target) == false then player:sendTextMessage(MESSAGE_STATUS_WARNING, "You can only skin creatures.") -- The error message it will give if the player is trying to skin something that isn't a creature. else player:sendTextMessage(MESSAGE_STATUS_WARNING, "You cannot skin this creature.") -- The error message it will give if t he player is trying to skin a creature which isn't added in the configuration above. return true end end  
  2. Gostei
    Oneda deu reputação a Vodkart em Dinimuir o tempo de atualizaçao   
    pelo onKIll
     
    function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then doPlayerSave(cid) end return true end  
  3. Gostei
    Oneda recebeu reputação de hieybr em [8.54] PokeCyan [ Editado By Senhor] Atualizado 3.0 2016   
    Recomendo que quem baixe o servidor, dêem uma olhada nas actions... Principalmente no script "bruno5"

Informação Importante

Confirmação de Termo