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
By gabrielbr, 14 de jan. de 2008 in Actions e Talkactions
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
Edited Fevereiro 9 by Acuhewskao
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:
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
info
Group: Banidos
Joined: 25/09/06
Posts: 190
Reputation: 0
Tibia Character: M e N

ahh
nao vi que voce ja tinha feito
porem se quiser posso colocar um sistema de item por level
Edited Fevereiro 20 by MaNeRiNhU
info
Group: Herói
Joined: 25/02/07
Posts: 859
Reputation: +331
Gender: Masculino

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
info
Group: Banidos
Joined: 25/09/06
Posts: 190
Reputation: 0
Tibia Character: M e N

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
Edited Março 14 by MaNeRiNhU
info
Group: Conde
Joined: 06/08/06
Posts: 554
Reputation: +223
Tibia Character: Balacky

É 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
Dahorinha mais pdia organiza mais issu com spoils e talz pa dexa o topic mais bunitinhu ;D
Parabéns
Ateh.
info
Group: Banidos
Joined: 25/09/06
Posts: 190
Reputation: 0
Tibia Character: M e N

@GM Bekman
basta usar o script dele que eu modifiquei...
ele da apenas 1 item e depende do LvL
info
Group: Conde
Joined: 06/08/06
Posts: 554
Reputation: +223
Tibia Character: Balacky

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" />
info
Group: Banidos
Joined: 25/09/06
Posts: 190
Reputation: 0
Tibia Character: M e N

@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
info
Group: Conde
Joined: 06/08/06
Posts: 554
Reputation: +223
Tibia Character: Balacky

Não não você está enganado, aqui da só um clique aparece o item e já some o box.
info
Group: Visconde
Joined: 14/08/07
Posts: 322
Reputation: +4
Tibia Character: Conde Sapo (Secura)
Ideia muito boa mas a parte de scripts tá HORRORIVEL
(isso é um trocadilho.... HORROROSO com HORRIVEL)
o mininu só esqueceu do H
Isso melhorou 200% este tópico
Nada como um BOM scripter expor seu conhecimento.
:XTibia_smile: