GA

Box Que Da Item,igual A Do Mu(sor Que No Mu E Kundu)

Por gabrielbr, 14 de jan. de 2008 em Actions e Talkactions

script
29
6.5k
Conde SapoC
03 de fevereiro de 2008 às 02:47

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:

dougaucheD
09 de fevereiro de 2008 às 05:03

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 Fevereiro 9 por Acuhewskao

gabrielbrG
09 de fevereiro de 2008 às 15:43

da sim e sor vc ir na actions onde ta excrito box ai vai ta o id do dice ai muda para cual vc queizer :weight_lift: :smile_positivo:

gabrielbrG
15 de fevereiro de 2008 às 12:42

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

MaNeRiNhUM
20 de fevereiro de 2008 às 17:43

ahh

nao vi que voce ja tinha feito

porem se quiser posso colocar um sistema de item por level

Editado Fevereiro 20 por MaNeRiNhU

SkullsS
20 de fevereiro de 2008 às 18:44

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

MaNeRiNhUM
22 de fevereiro de 2008 às 16:03

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 Março 14 por MaNeRiNhU

1 mês depois...
Natanael BeckmanN
12 de março de 2008 às 22:23

É 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

FAG10F
14 de março de 2008 às 20:27

Dahorinha mais pdia organiza mais issu com spoils e talz pa dexa o topic mais bunitinhu ;D

 

Parabéns

Ateh.

MaNeRiNhUM
14 de março de 2008 às 22:21

@GM Bekman

basta usar o script dele que eu modifiquei...

ele da apenas 1 item e depende do LvL

Natanael BeckmanN
15 de março de 2008 às 11:42

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" />

MaNeRiNhUM
15 de março de 2008 às 13:39

@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

Natanael BeckmanN
17 de março de 2008 às 11:29

Não não você está enganado, aqui da só um clique aparece o item e já some o box.

2 anos depois...
MagonM
11 de setembro de 2010 às 18:23

PESSIMO, tipico mal organizado!