JulianoZN 62 Posted March 10, 2019 Report Share Posted March 10, 2019 (edited) Então eu tinha esse script de carpet em transform_to a bastante tempo desde 2016, mais simples Então então estou postando hoje Vamos ao Assunto. vai em data "datapack"/actions/scripts Crie um arquivo chamado carpet.lua coloque isso Spoiler local object_itemid = { [CARPET FECHADO] = {transform_to = CARPET ABERTO, premium = false, useWith=true}, [CARPET ABERTO] = {transform_to = CARPET FECHADO, premium = false, useWith=false}, } function onUse(cid, item, frompos, item2, topos) local storage = 789561 local time = 1 local sendEffect = true -- true or false local EffectId = 1 local item_from_table = object_itemid[item.itemid] if exhaustion.check(cid, storage) then return false end if item_from_table then if item_from_table.premium and not isPremium(cid) then return false and doPlayerSendCancel(cid, "Você não e vip.") end doRemoveItem(item.uid,1) if item_from_table.useWith then doCreateItem(item_from_table.transform_to,1,topos) else doCreateItem(item_from_table.transform_to,1,frompos) end if sendEffect then doSendMagicEffect(getThingPos(cid), EffectId) end end return true and exhaustion.set(cid,storage,time) end Volte na pasta actions abra o actions.xml Coloque Spoiler <action itemid="ID CARPET FECHADO;ID CARPET ABERTO" event="script" value="carpet.lua"/> Carpet fechado Carpet aberto DONO: PokemonZbr ( Online ) DONO: OtPokemonTvZ ( Offline ) Links do meu jogo https://pokemonzbr.com/ (Online) http://otpokemontvz.com/ (Offline) Eu sou: Scripter: 5% Mapper: 30% Programador: 4% Website : 50% Edited March 28, 2019 by JulianoZN GeanPro, Crypter, raulcdj and 3 others 4 2 Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/ Share on other sites More sharing options...
Diretor Yan Liima 578 Posted March 10, 2019 Diretor Report Share Posted March 10, 2019 Interessante... Obrigado por trazer essa script pra comunidade Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/#findComment-1749749 Share on other sites More sharing options...
isac001 0 Posted December 29, 2020 Report Share Posted December 29, 2020 Alguem sabe me dizer, porque o carpet não salva ao reniciar o server? Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/#findComment-1763968 Share on other sites More sharing options...
GeanPro 0 Posted February 25, 2024 Report Share Posted February 25, 2024 (edited) legal mas quando usa o carpet na bag ou em uma parede que ta com o lado errado da erro da esse erro 24/02/2024 23:24:00] [Error - Action Interface] [24/02/2024 23:24:00] data/actions/scripts/yucashcarpet.lua:onUse [24/02/2024 23:24:00] Description: [24/02/2024 23:24:00] (luaDoCreateItem) Tile not found Edited February 25, 2024 by GeanPro Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/#findComment-1774602 Share on other sites More sharing options...
rafersiq 22 Posted February 25, 2024 Report Share Posted February 25, 2024 11 horas atrás, GeanPro disse: legal mas quando usa o carpet na bag ou em uma parede que ta com o lado errado da erro da esse erro 24/02/2024 23:24:00] [Error - Action Interface] [24/02/2024 23:24:00] data/actions/scripts/yucashcarpet.lua:onUse [24/02/2024 23:24:00] Description: [24/02/2024 23:24:00] (luaDoCreateItem) Tile not found e que nao esta reconhecendo o tile que vc esta tentando colocar o carpet GeanPro 1 Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/#findComment-1774606 Share on other sites More sharing options...
GeanPro 0 Posted February 25, 2024 Report Share Posted February 25, 2024 23 minutos atrás, rafersiq disse: e que nao esta reconhecendo o tile que vc esta tentando colocar o carpet ss, conseguir arrumar é pq dava pra usar ele dentro da bag ai dava esse bug aqui a correção se alguem quiser usar. \/ testei ta GG, mas Obrigado. function onUse(cid, item, frompos, item2, topos) local storage = 789561 local time = 1 local sendEffect = true -- true or false local EffectId = 335 local item_from_table = object_itemid[item.itemid] -- Verifica se o item foi usado dentro de uma bolsa if frompos.x == CONTAINER_POSITION then -- Verifica se o item2 é uma bolsa (bag) e está na mesma posição que o carpete if not isContainer(item2.uid) and topos.x == frompos.x and topos.y == frompos.y then doPlayerSendCancel(cid, "Você não pode usar o carpete dentro de uma bolsa.") return false end end -- Remove o item do chão doRemoveItem(item.uid, 1) -- Cria o item transformado if item_from_table then if item_from_table.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Você não é vip.") return false end if item_from_table.useWith then doCreateItem(item_from_table.transform_to, 1, topos) else doCreateItem(item_from_table.transform_to, 1, frompos) end if sendEffect then doSendMagicEffect(getThingPos(cid), EffectId) end end return true and exhaustion.set(cid, storage, time) end Link to comment https://xtibia.com/forum/topic/249354-action-carpet-system-em-transform_to/#findComment-1774607 Share on other sites More sharing options...
Recommended Posts