Jump to content
  • Announcements

    • Majesty

      Seja bem vindo a seção Downloads!   04/25/2019

      Seja bem vindo a seção Downloads! 
      Aqui, você pode encontrar diversos downloads sobre OTServ. Se tiver dúvidas e/ou problemas sobre algum conteúdo, primeiro, você deve utilizar a ferramenta de busca e explorar o fórum. Se você não encontrou o que precisa, considere criar um tópico na seção de Suporte:
      https://forums.otserv.com.br/index.php?/forums/forum/402-suporte-dúvidas-bugs-erros/ Considere também ler o grande guia do usuário com dúvidas, que possui várias recomendações e dicas de como tirar dúvidas.

      Obrigado e boa sorte!
Sign in to follow this  
Majesty

[TFS 1.x] Sistema de Unwrap - House Itens

Recommended Posts

Majesty
Citar

Nome: [TFS 1.x] Sistema de Unwrap - House Itens

Versão: [10.98+] // Qualquer uma disponível para TFS 1.3 / OTX

Tipo do script: Action

Créditos: Deletera

Em data/actions/scripts/other, crie um arquivo store_house.lua com o código abaixo:

Spoiler
local constructionKits = {
    [27850] = 27850, [27728] = 27728, [26075] = 26075, [26059] = 26059, [26083] = 26083,
    [26073] = 26073, [26077] = 26077, [26063] = 26063, [26079] = 26079, [26067] = 26067,
    [26356] = 26356, [26349] = 26349, [26358] = 26358, [26354] = 26354, [27897] = 27897,
    [27905] = 27905, [27901] = 27901, [27893] = 27893, [27892] = 27892, [27894] = 27894,
    [27895] = 27895, [27896] = 27896, [26109] = 26109, [26110] = 26110, [26111] = 26111,
    [26371] = 26371, [26372] = 26372, [26373] = 26373, [26374] = 26374, [26375] = 26375,
    [27084] = 27084, [27085] = 27085, [27086] = 27086, [27087] = 27087, [27088] = 27088,
    [27089] = 27089, [27090] = 27090, [27091] = 27091, [26370] = 26370, [26347] = 26347,
    [26364] = 26364, [26098] = 26098, [26107] = 26107, [26100] = 26100, [27100] = 27100,
    [27889] = 27889, [26094] = 26094, [26090] = 26090, [27102] = 27102, [27886] = 27886,
    [26057] = 26057, [26055] = 26055, [26104] = 26104, [26105] = 26105, [26106] = 26106,
    [26379] = 26379, [26380] = 26380, [26381] = 26381
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local kit = constructionKits[item.actionid]
    if not kit then
        return false
    end

    if fromPosition.x == CONTAINER_POSITION then
        player:sendTextMessage(MESSAGE_STATUS_SMALL, "Put the construction kit on the floor first.")
    elseif not fromPosition:getTile():getHouse() then
        player:sendTextMessage(MESSAGE_STATUS_SMALL, "You may construct this only inside a house.")
    else
        item:transform(kit)
        item:setActionId(0)
        fromPosition:sendMagicEffect(CONST_ME_POFF)
    end

    return true
end

 

Em data/actions/actions.xml adicione:

Spoiler
<action actionid="27850" script="other/store_house.lua" />
<action actionid="26347" script="other/store_house.lua" />
<action actionid="27100" script="other/store_house.lua" />
<action actionid="27886" script="other/store_house.lua" />
<action actionid="26106" script="other/store_house.lua" />
<action actionid="26109" script="other/store_house.lua" />
<action actionid="26373" script="other/store_house.lua" />
<action actionid="27086" script="other/store_house.lua" />
<action actionid="27091" script="other/store_house.lua" />
<action actionid="26107" script="other/store_house.lua" />
<action actionid="26090" script="other/store_house.lua" />
<action actionid="26104" script="other/store_house.lua" />
<action actionid="26381" script="other/store_house.lua" />
<action actionid="26059" script="other/store_house.lua" />
<action actionid="26079" script="other/store_house.lua" />
<action actionid="26354" script="other/store_house.lua" />
<action actionid="27892" script="other/store_house.lua" />
<action actionid="26110" script="other/store_house.lua" />
<action actionid="26374" script="other/store_house.lua" />
<action actionid="27087" script="other/store_house.lua" />
<action actionid="26370" script="other/store_house.lua" />
<action actionid="26100" script="other/store_house.lua" />
<action actionid="27102" script="other/store_house.lua" />
<action actionid="26105" script="other/store_house.lua" />
<action actionid="26083" script="other/store_house.lua" />
<action actionid="26067" script="other/store_house.lua" />
<action actionid="27897" script="other/store_house.lua" />
<action actionid="27894" script="other/store_house.lua" />
<action actionid="26111" script="other/store_house.lua" />
<action actionid="26375" script="other/store_house.lua" />
<action actionid="27088" script="other/store_house.lua" />
<action actionid="26356" script="other/store_house.lua" />
<action actionid="27905" script="other/store_house.lua" />
<action actionid="27895" script="other/store_house.lua" />
<action actionid="26371" script="other/store_house.lua" />
<action actionid="27084" script="other/store_house.lua" />
<action actionid="27089" script="other/store_house.lua" />
<action actionid="26057" script="other/store_house.lua" />
<action actionid="26379" script="other/store_house.lua" />
<action actionid="27728" script="other/store_house.lua" />
<action actionid="26077" script="other/store_house.lua" />
<action actionid="26349" script="other/store_house.lua" />
<action actionid="27901" script="other/store_house.lua" />
<action actionid="27896" script="other/store_house.lua" />
<action actionid="26372" script="other/store_house.lua" />
<action actionid="27085" script="other/store_house.lua" />
<action actionid="27090" script="other/store_house.lua" />
<action actionid="26098" script="other/store_house.lua" />
<action actionid="26094" script="other/store_house.lua" />
<action actionid="26055" script="other/store_house.lua" />
<action actionid="26380" script="other/store_house.lua" />
<action actionid="26075" script="other/store_house.lua" />
<action actionid="26063" script="other/store_house.lua" />
<action actionid="26358" script="other/store_house.lua" />
<action actionid="27893" script="other/store_house.lua" />
<action actionid="26073" script="other/store_house.lua" />
<action actionid="26364" script="other/store_house.lua" />

 

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×