Ir para conteúdo

Posts Recomendados

creditos: Gecko

se vc quer ser jardineiro

+ axa vergonhoso viver uma vida assim (sem ofensas xD)

pode viver no tibia e kem sabe fazer akele concurso de plantas no seu quintal

ai vai o code

garden.xml

function onUse(cid, item, frompos, item2, topos)

fishingskill = getPlayerSkill(cid,6)

formula = fishingskill /200+0.85* math.random()

if formula > 0.70 then

doSendMagicEffect(topos,1)

doPlayerAddSkillTry(cid,6,1)

    if item.itemid == 5157 then

        doPlayerAddItem(cid, 2675, 1)

    elseif item.itemid == 4181 then

        doPlayerAddItem(cid, 2789, 1)

    elseif item.itemid == 2748 then

        doPlayerAddItem(cid, 2744, 1)

    elseif item.itemid == 2750 then

        doPlayerAddItem(cid, 2746, 1)

    elseif item.itemid == 2748 then

        doPlayerAddItem(cid, 2754, 1)

    elseif item.itemid == 4153 then

        doPlayerAddItem(cid, 2753, 1)

    elseif item.itemid == 3985 then

        doPlayerAddItem(cid, 2747, 1)

    elseif item.itemid == 2764 then

        doPlayerAddItem(cid, 2754, 1)

    elseif item.itemid == 2766 then

        doPlayerAddItem(cid, 2745, 1)

    elseif item.itemid == 2781 then

        doPlayerAddItem(cid, 2690, 1)

    elseif item.itemid == 4017 then

        doPlayerAddItem(cid, 2681, 1)

    else

        return 0

    end

    return 1

else

        doSendMagicEffect(topos,2)

        return 0

end

end

e em actions.xml

-- Gardening

<action itemid="5157" script="garden.lua"  />  -- Mango

<action itemid="4181" script="garden.lua"  />  -- Mushroom tree

<action itemid="2763" script="garden.lua"  />  -- Rose Bush

<action itemid="2750" script="garden.lua"  />  -- Yellow Royal

<action itemid="2748" script="garden.lua"  />  -- Love Flower

<action itemid="4153" script="garden.lua"  />  -- Small Sunflower

<action itemid="3985" script="garden.lua"  />  -- Plant

<action itemid="2764" script="garden.lua"  />  -- Rose Bush

<action itemid="2766" script="garden.lua"  />  -- Rose Bush

<action itemid="2781" script="garden.lua"  />  -- Agave

<action itemid="4017" script="garden.lua"  />  -- Fruit

olha o exemplo

mygardenon9.jpg

comentem

flws :bye:

Link para o comentário
https://xtibia.com/forum/topic/33232-script-de-jardineiro/
Compartilhar em outros sites

Ae

Não entendi muito bem esta action

Poderia explicá-la?

Mas ve se eu entedi certo

Você usa tal iten em algum tile daqueles que estão na foto

Ai tem uma chance de virar alguma flor, árvore ou coisa do gênero?

Link para o comentário
https://xtibia.com/forum/topic/33232-script-de-jardineiro/#findComment-179717
Compartilhar em outros sites

  • 2 months later...
  • 10 months later...
  • 2 months later...

Criativo em parabens a vc e ao Gecko, pelo q entendi soh dando uma olhadinha a funçao conciste em jogar a fruta no seu jardim e ao dar use ela se tranforma na arvore conforme a fruta, e tenho uma ideia para q quando vc plantar vc correr o risco de ser picado por formigas. Vou tentar fazer aki e posto qd der

Link para o comentário
https://xtibia.com/forum/topic/33232-script-de-jardineiro/#findComment-516467
Compartilhar em outros sites

muito bom, dei uma editada rapido, toma aí ó :D

chances de 1 pra 5 de firmigas te atacarem!

 

function onUse(cid, item, frompos, item2, topos)

 

pos = getPlayerPosition(cid)

formiga = math.random(10,100)

chance = math.random(1,5)

fishingskill = getPlayerSkill(cid,6)

formula = fishingskill /200+0.85* math.random()

if formula > 0.70 then

doSendMagicEffect(topos,1)

doPlayerAddSkillTry(cid,6,1)

if item.itemid == 5157 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2675, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 4181 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2789, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2748 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2744, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2750 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2746, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2748 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2754, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 4153 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2753, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 3985 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2747, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2764 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2754, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2766 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2745, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 2781 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2690, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

elseif item.itemid == 4017 then

if chance == 1 or chance == 2 or chance == 3 or chance == 4 then

doPlayerAddItem(cid, 2681, 1)

if chance == 5 then

doPlayerAddHealth(pos,-formiga)

doPlayerSendTextMessage(pos,22,"Oh noh, bugs atacked you!")

doSendAnimatedText(pos, formiga,TEXTCOLOR_RED)

 

else

return 0

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

end

 

return 1

else

doSendMagicEffect(topos,2)

return 0

end

end

 

creditos : 10% me, 10% rockets, 80% tibiaa4e! VLWW

 

---edit

qual o id da terra q tem q fazer encima? o.O

Editado por FoxXs
Link para o comentário
https://xtibia.com/forum/topic/33232-script-de-jardineiro/#findComment-516910
Compartilhar em outros sites

hauhsauhs, bem legal kra^^ hehe, ai éso colocar no mapa um lugar pro kra fazeo jardim=D

e... uma action pra q kando o kra usa uma fruta no jardim, nasce umpe dakela fruta, onde o kra pode colhe hehe,é uma boa ideia

Link para o comentário
https://xtibia.com/forum/topic/33232-script-de-jardineiro/#findComment-517935
Compartilhar em outros sites

×
×
  • Criar Novo...