Ir para conteúdo

Posts Recomendados

Ideia muito boa mas a parte de scripts tá HORRORIVEL

(isso é um trocadilho.... HORROROSO com HORRIVEL)

o mininu só esqueceu do H

 

 

Voce testou os scripts? :)

Me pare ce que voce é novo nesse pedaço, vamos dar uma ajudinha.

Primeiro, voce não precisa verificar se o item vai ser removido

Segundo, voce pode fazer todos os scripts em um só

aplauso.gif

Isso melhorou 200% este tópico

 

Nada como um BOM scripter expor seu conhecimento.

 

 

:XTibia_smile:

Gostei

Isso é bom para fazer eventos nos OTS

Valendo "Box"

 

PS: Não da pra fazer com aparecia de Present Bag?

Ia ficar irado

Abraço

Editado por Acuhewskao

para por para sortia um item e sor vc fazer isso em todas as box

 

 

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

luck = math.random(1,10)

pos = getPlayerPosition(cid)

 

if item.itemid == 5792 and luck == 1 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2458,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha um chain helmet.")

 

elseif item.itemid == 5792 and luck == 2 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2195,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha uma boh.")

 

elseif item.itemid == 5792 and luck == 3 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2464,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha um chain armor.")

 

elseif item.itemid == 5792 and luck == 4 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2467,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha um leather armor.")

 

elseif item.itemid == 5792 and luck == 5 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2643,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha um leather armor.")

 

elseif item.itemid == 5792 and luck == 6 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2468,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha uma studded legs.")

 

elseif item.itemid == 5792 and luck == 7 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2478,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha uma brass legs.")

 

elseif item.itemid == 5792 and luck == 8 then

ddoPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2648,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha uma chain legs.")

 

elseif item.itemid == 5792 and luck == 9 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2511,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha um brass shield.")

 

elseif item.itemid == 5792 and luck == 10 then

doPlayerRemoveItem(cid,5792,1)

doSendMagicEffect(pos,6)

doPlayerAddItem(cid,2383,1)

doPlayerSendTextMessage(cid,22,"vc acaba de ganha uma spike sword.")

 

end

return 1

end

ahh

nao vi que voce ja tinha feito

porem se quiser posso colocar um sistema de item por level

Editado por MaNeRiNhU

razoavel..

eu prefiro se for tipo assim

se usa e ele sortei os itens

em vez de voce receber 3 de uma vez =x

 

ai eh sorte msm..

igual no mu se nunca sabe oq vai recebe

 

;D

 

fui

modifiquei o script

colocando os itens dependendo do lv

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

level = getPlayerLevel(cid)

if level > 30

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar uma BOH")

doPlayerAddItem(cid,2195,1)

doRemoveItem(item.uid,1)

if level > 60

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar uma K-ARMOR")

doPlayerAddItem(cid,2476,1)

doRemoveItem(item.uid,1)

if level > 90

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar uma Crown armor")

doPlayerAddItem(cid,2487,1)

doRemoveItem(item.uid,1)

if level > 120

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar uma Magic Sword")

doPlayerAddItem(cid,2400,1)

doRemoveItem(item.uid,1)

if level > 160

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar um G-Helmet)

doPlayerAddItem(cid,2472,1)

doRemoveItem(item.uid,1)

if level > 250

doPlayerSendTextMessage(cid,22,"Voce acabou de ganhar uma DSL")

doPlayerAddItem(cid,2469,1)

doRemoveItem(item.uid,1)

end

end

nao testei

porem acho que irá funcionar

caso encontrem erros me conumiquem por MP

Editado por MaNeRiNhU
  • 3 weeks later...

É cara legal só que mu e diferente vamos supor um box da e-plate, mms, g-legs ae n cai os 3 vai a sortei um dos 3 cai n cai os 3. =S

Script modificado agora sim está igual ao mu a box contem varios itens só que só um cai é no sorteio By skulls.

 

 

function onUse(cid, item, frompos, item2, topos)
r1 = math.random(1,16)
if doRemoveItem(item.uid,1) then
if r1 == 1 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2357,1)
elseif r1 == 2 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2466,1)
elseif r1 == 3 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2446,1)
elseif r1 == 4 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2520,1)
elseif r1 == 5 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,6391,1)
elseif r1 == 6 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,5741,1)
elseif r1 == 7 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2128,1)
elseif r1 == 8 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,7462,1)
elseif r1 == 9 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2451,1)
elseif r1 == 10 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,7391,1)
elseif r1 == 11 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2488,1)
elseif r1 == 12 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2173,1)
elseif r1 == 13 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2477,1)
elseif r1 == 14 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2496,1)
elseif r1 == 15 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2520,1)
elseif r1 == 16 then
doPlayerSendTextMessage(cid,22,"You were lucky.")
doPlayerAddItem(cid,2514,1)
end
end
end

 

 

<action itemid="5797" script="Box.lua" />

@GM Bekman

voce se esqueceu da seguinte frase: doRemoveItem(item.uid,1) para remover o item, senao o player poderá ficar dando varios uses

vou tentar colocar LvL e que so pode usar 1 vez

  • 2 years later...
×
×
  • Criar Novo...