TI

Vocation Chest

Por tibiaa4e, 18 de nov. de 2006 em Actions e Talkactions

script
7
2.7k
tibiaa4eT
18 de novembro de 2006 às 14:36

qdo fiz meu acc manager tava tentando fazer um vocation chest

ai vi um no otfans

o q eu fiz foi kase igual

só q naum funfava

seria 20% meu e 80% dele

+ como ele me ajudou 100%

é assim tem uma quest + só uma vocação escolhida pode fazer

vamus aos codes

exemplo:

if item.uid == **** then -- This is the unique ID on the chest in map editor

queststatus = getPlayerStorageValue(cid,100)

if queststatus ~= 1 then

PlayerVoc = getPlayerVocation(cid)

if PlayerVoc == 1 then -- the 1 is the vocation ID for sorc, you change

doPlayerSendTextMessage(cid,22,"You have found an Unholy Wand.") -- Item name you find

doPlayerAddItem(cid,2453,1) -- the 2453 is the wand ID

setPlayerStorageValue(cid,100,1)

else

doPlayerSendTextMessage(cid,22,"You are not a sorcerer or have gotten your wand already") -- empty chest msg

end

end

end

explicando

em

PlayerVoc = getPlayerVocation(cid)

if PlayerVoc == 1 then

no lugar de 1 se troca para id da vocação q vc kiser

1 sorcerer

2 druid

3 paladin

4 knight

bem é isso

o resto é igual kalker script de quest

ainda naum deu tempo de testar se tiver bugs fale

duvidas,criticas,digam aki

flws :bye:

looktovaskL
18 de novembro de 2006 às 16:16

eu vi fiz uma action parecida uma vez soh pq ela dava um item diferente pa cada voc

soulblasterS
18 de novembro de 2006 às 20:41

@look_of_hell_

sim, da pra faser mesmo ;P

aki ta uma que eu acabei de fase:

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

  if item.uid == 5000 then

    queststatus = getPlayerStorageValue(cid,5000)

    if queststatus == -1 then

      PlayerVoc = getPlayerVocation(cid)

      if PlayerVoc == 1 then

        doPlayerSendTextMessage(cid,22,"You have found a Wand.")

        doPlayerAddItem(cid,2190,1)

        setPlayerStorageValue(cid,5000,1)

      elseif PlayerVoc == 2 then

        doPlayerSendTextMessage(cid,22,"You have found a Rod.")

        doPlayerAddItem(cid,2182,1)

        setPlayerStorageValue(cid,5000,1)

      elseif PlayerVoc == 3 then

        doPlayerSendTextMessage(cid,22,"You have found a crossbow.")

        doPlayerAddItem(cid,2455,1)

        setPlayerStorageValue(cid,5000,1)

      elseif PlayerVoc == 4 then

        doPlayerSendTextMessage(cid,22,"You have found a shield.")

        doPlayerAddItem(cid,2525,1)

        setPlayerStorageValue(cid,5000,1)

      end

    else

    doPlayerSendTextMessage(cid,22,"It is empty.")

    end

  end

return 1

end

cya... :bye:

Editado Novembro 18 por soulblaster

tibiaa4eT
19 de novembro de 2006 às 12:24

:p

essa é melhor ainda

na proxima versão do meu ot vou colocoa esse ai

2 meses depois...
codornaC
17 de janeiro de 2007 às 23:21

ond eu coloco esse script??

 

em actions cum um nome diferent??

skynagerloasS
23 de janeiro de 2007 às 08:42

Lua Script Error: [Action Interface]

data/actions/scripts/quests/inicial.lua:onUse

 

luaSetPlayerStorageValue(). Player not found

 

 

errro =/

1 mês depois...
TemplarrT
20 de fevereiro de 2007 às 23:09

Muito rox pra quem quer fazer quest pra 1 voc só, ou varias, isso vai ajduar muita gente, ^^

 

Abraço,

Templarr.