Pescando Tesouro

Por
em Actions e Talkactions

Visitante xbowaxx

avatar
Visitante

INFOS

Grupo: Visitante

Idéia de pescar tesouros: root_pk

Formulação da Action: Arkilus

Com esse mod dá pra pegar gps, mapa, ring, pearls, gems e diamonds com fishing.

Usei como base o script de fishing que vem junto com o Yur 0.9.2 e fiz algumas modificações:

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

if (item2.itemid >= 601 and item2.itemid <= 603) or (item2.itemid >= 729 and item2.itemid <= 740) then

skill_level = getPlayerSkill(cid,6)

doPlayerAddSkillTry(cid,6,1)

doSendMagicEffect(topos,1)

fish = math.random(1,(100+skill_level/10)) --Formula by DarthRevan--

  if skill_level >= fish then

      item = math.random(1,100)

-- *********************************************************

-- *********************************************************

-- Pegando tesouros em fishing

-- Idéia:root_pk

-- Código: Arkilus

      if item <= 99 then

        doPlayerAddItem(cid,3516,1)

      else

        gp = math.random(1,101)

        if gp <= 100 then

            doPlayerAddItem(cid,2969,gp)

            gpmsg = "You have found " .. gp .. " gps!"

            doPlayerSendTextMessage(cid,22,gpmsg)

        else

            treasure = math.random(1,5)

            if treasure == 1 then -- diamonds

              diamonds = math.random (1,10)

              doPlayerAddItem(cid,2966,diamonds)

              premio = diamonds .. " diamonds"

            elseif treasure == 2 then -- gems

              gemcolor = math.random(4,9)

              gem = 297 .. gemcolor

              doPlayerAddItem(cid,gem,1)

              premio = "a gem"

            elseif treasure == 3 then -- pearls

              pearlcount = math.random(1,10)

              pearlcolor = math.random (4,5)

              pearl = 296 .. pearlcolor             

              doPlayerAddItem(cid,pearl,pearlcount)

              premio = pearlcount .. " pearls"

            elseif treasure == 4 then -- map

              premio = "a treasure map"

              mapid = doPlayerAddItem(cid,3170,1)

              doSetItemActionId(mapid,1232)

              doSetItemText(mapid,"Conteúdo do mapa aqui")

            elseif treasure == 5 then -- ring

              premio = "a magic ring"

              doPlayerAddItem(cid,3183,1)

            end

            msg = "You have found " .. premio .. "!"

            doPlayerSendTextMessage(cid,22,msg)

        end

      end

  end

-- fim da parte dos tesouros

-- *********************************************************

-- *********************************************************

-- *****************************************

-- adicione isso caso coloque para o mapa vir com algo escrito

elseif item.actionid == 1232 then

  doShowTextWindow(item.uid,0,0)

end

-- *****************************************

end

return 1

end

Não se esqueçam de declarar o actionid do map pro script de fishing:

CODE

<action actionid="1232" script="fishing.lua"/>

Lembrando que podem haver erros porque ainda não tive tempo de testá-la

fonte: ######

daniloveloso

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/10/05Posts: 2

Massa esse topico!! Congrulations... :w00t:

Visitante xbowaxx

avatar
Visitante

INFOS

Grupo: Visitante

vlw \o\

x9kill

Frésco ♪
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 22/09/05Posts: 178Char no Tibia: Tibia sux.

cara vc é muito bom manow q legal xD isso ta parecendo aquela parada no empire otserver pra pega diamond rubys etc nas rochas xD

do you wanna a suruba ?

-

vtc3wedzwocumnphw0if.jpg


brigads
arcazy
signmg5.jpg
-
flyw
test2vk7.png

p/ os mikows

gi8ng2hzulbxb0yagvue.jpg
-
le7qv4iz311k1ugg95.jpg

Visitante xbowaxx

avatar
Visitante

INFOS

Grupo: Visitante

hehehe

pior q eh ;p

quijinho

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/01/06Posts: 4

kra q ideia doida

+ eh manerinha =)