Ir para conteúdo

Uma Action


Rotciv

Posts Recomendados

a idéia da quest foi minha, mas a action foi feita por Arkilus

a action eh o seguinte:

você chega no local:

parte19vz.png

dai dps ele ia apertava a alavanca que fika do lado de lá

<------

e levanta umas paredes em volta e cria um alavanca lá em baixo \/ do lado de um tile afundado.

parte27ck.png

dps que as paredes subirem ... o player coloca os 3 itens mostrados na figura abaixo (DEMON HELMET, E-PLATE , GOLDEN LEGS), dps o player vai lá embaixo e clica na alavanca de baixo.

parte31yf.png

dai dps ele vai e pega o item feliz dele!!!^^

parte44ro.png

dps ele clica na alavanca lá do lado esquerdo

<-------

e tudo fika igual ao como era antes

parte19vz.png

P.S: SÓ DA PARA FAZER ESSA QUEST UMA VEZ!

VAMOS AO QUE INTERESSA! O CODE!

Scripit:

 

function onUse(cid, item, frompos, item2, topos)sw1_uid = sw2_uid =p_z = w1_x = w1_y = w2_x = w2_y = w3_x = w3_y = w4_x = w4_y = w5_x = w5_y = w6_x = w6_y = w7_x = w7_y = w8_x = w8_y = w9_x = w9_y = w10_x = w10_y = w11_x = w11_y = w12_x = w12_y = w13_x = w13_y = w14_x = w14_y = w15_x = w15_y = w16_x = w16_y = w17_x = w17_y =w18_x = w18_y =w19_x = w19_y =w20_x = w20_y = w21_x = w21_y = w22_x = w22_y = w23_x = w23_y = w24_x = w24_y = w25_x = w25_y = w26_x = w26_y = w27_x = w27_y =w28_x = w28_y =w29_x = w29_y =w30_x = w30_y = w31_x = w31_y = w32_x = w32_y = w33_x = w33_y = w34_x = w34_y = w35_x = w35_y = w36_x = w36_y = w37_x = w37_y =w38_x = w38_y =w39_x = w39_y =w40_x = w40_y = w41_x = w41_y = w42_x = w42_y = w43_x = w43_y = sw1_x = sw1_y = sw2_x = sw2_y =dh_x = dh_y = ep_x = ep_y =gl_x = gl_y = mls_x = mls_y = w1p = {x=w1_x, y=w1_y, z=p_z, stackpos=1}w2p = {x=w2_x, y=w2_y, z=p_z, stackpos=1}w3p = {x=w3_x, y=w3_y, z=p_z, stackpos=1}w4p = {x=w4_x, y=w4_y, z=p_z, stackpos=1}w5p = {x=w5_x, y=w5_y, z=p_z, stackpos=1}w6p = {x=w6_x, y=w6_y, z=p_z, stackpos=1}w7p = {x=w7_x, y=w7_y, z=p_z, stackpos=1}w8p = {x=w8_x, y=w8_y, z=p_z, stackpos=1}w9p = {x=w9_x, y=w9_y, z=p_z, stackpos=1}w10p = {x=w10_x, y=w10_y, z=p_z, stackpos=1}w11p = {x=w11_x, y=w11_y, z=p_z, stackpos=1}w12p = {x=w12_x, y=w12_y, z=p_z, stackpos=1}w13p = {x=w13_x, y=w13_y, z=p_z, stackpos=1}w14p = {x=w14_x, y=w14_y, z=p_z, stackpos=1}w15p = {x=w15_x, y=w15_y, z=p_z, stackpos=1}w16p = {x=w16_x, y=w16_y, z=p_z, stackpos=1}w17p = {x=w17_x, y=w17_y, z=p_z, stackpos=1}w18p = {x=w18_x, y=w18_y, z=p_z, stackpos=1}w19p = {x=w19_x, y=w19_y, z=p_z, stackpos=1}w20p = {x=w20_x, y=w20_y, z=p_z, stackpos=1}w21p = {x=w21_x, y=w21_y, z=p_z, stackpos=1}w22p = {x=w22_x, y=w22_y, z=p_z, stackpos=1}w23p = {x=w23_x, y=w23_y, z=p_z, stackpos=1}w24p = {x=w24_x, y=w24_y, z=p_z, stackpos=1}w25p = {x=w25_x, y=w25_y, z=p_z, stackpos=1}w26p = {x=w26_x, y=w26_y, z=p_z, stackpos=1}w27p = {x=w27_x, y=w27_y, z=p_z, stackpos=1}w28p = {x=w28_x, y=w28_y, z=p_z, stackpos=1}w29p = {x=w29_x, y=w29_y, z=p_z, stackpos=1}w30p = {x=w30_x, y=w30_y, z=p_z, stackpos=1}w31p = {x=w31_x, y=w31_y, z=p_z, stackpos=1}w32p = {x=w32_x, y=w32_y, z=p_z, stackpos=1}w33p = {x=w33_x, y=w33_y, z=p_z, stackpos=1}w34p = {x=w34_x, y=w34_y, z=p_z, stackpos=1}w35p = {x=w35_x, y=w35_y, z=p_z, stackpos=1}w36p = {x=w36_x, y=w36_y, z=p_z, stackpos=1}w37p = {x=w37_x, y=w37_y, z=p_z, stackpos=1}w38p = {x=w38_x, y=w38_y, z=p_z, stackpos=1}w39p = {x=w39_x, y=w39_y, z=p_z, stackpos=1}w40p = {x=w40_x, y=w40_y, z=p_z, stackpos=1}w41p = {x=w41_x, y=w41_y, z=p_z, stackpos=1}w42p = {x=w42_x, y=w42_y, z=p_z, stackpos=1}sw1p = {x=sw1_x, y=sw1_y, z=p_z, stackpos=1}sw1 = getThingfromPos(sw1p)sw2p = {x=sw2_x, y=sw2_y, z=p_z, stackpos=1}sw2 = getThingfromPos(sw2p)dhp = {x=dh_x, y=dh_y, z=p_z, stackpos=255}dh = getThingfromPos(dhp)epp = {x=ep_x, y=ep_y, z=p_z, stackpos=255}ep = getThingfromPos(epp)glp = {x=gl_x, y=gl_y, z=p_z, stackpos=255}gl = getThingfromPos(glp)mlsp = {x=mls_x, y=mls_y, z=p_z, stackpos=1}stat = getPlayerStorageValue(cid, 1655)  if item.uid == sw1_uid then     c_rWall(w1p, w2p, w3p, w4p, w5p, w6p, w7p, w8p, w9p, w10p, w11p, w12p, w13p, w14p, w15p, w16p, w17p, w18p, w19p, w20p, w21p, w22p, w23p, w24p, w25p, w26p, w27p, w28p, w29p, w30p, w31p, w32p, w33p, w34p, w35p, w36p, w37p, w38p, w39p, w40p, w41p, w42p, item, sw2p)     checkSw(item)  elseif item.uid == sw2_uid then     if sw1.itemid == 2712 then        items = checkItems(dh, ep, gl)        if items == 1 then           if stat ~= 1 then              rcItems(dh, ep, gl, dhp, epp, glp, mlsp)              checkSw(item)              setPlayerStorageValue(cid, 1655, 1)           else              doPlayerSendCancel(cid, "You cant perform this quest again.")           end        else           doPlayerSendCancel(cid, "Wrong item(s)!")           doSendMagicEffect(mlsp, 2)        end     else        doPlayerSendCancel(cid, "First raise the walls!")     end  endreturn 1endfunction c_rWall(w1p, w2p, w3p, w4p, w5p, w6p, w7p, w8p, w9p, w10p, w11p, w12p, w13p, w14p, w15p, w16p, w17p, w18p, w19p, w20p, w21p, w22p, w23p, w24p, w25p, w26p, w27p, w28p, w29p, w30p, w31p, w32p, w33p, w34p, w35p, w36p, w37p, w38p, w39p, w40p, w41p, w42p, item, sw2p)  if item.itemid == 2711 then    doCreateItem(1277, 1, w1p)    doCreateItem(1276, 1, w2p)    doCreateItem(1276, 1, w3p)    doCreateItem(1276, 1, w4p)    doCreateItem(1276, 1, w5p)    doCreateItem(1276, 1, w6p)    doCreateItem(1276, 1, w7p)    doCreateItem(1276, 1, w8p)    doCreateItem(1276, 1, w9p)    doCreateItem(1276, 1, w10p)    doCreateItem(1276, 1, w11p)    doCreateItem(1276, 1, w12p)    doCreateItem(1276, 1, w13p)    doCreateItem(1275, 1, w14p)    doCreateItem(1275, 1, w15p)    doCreateItem(1275, 1, w16p)    doCreateItem(1275, 1, w17p)    doCreateItem(1275, 1, w18p)    doCreateItem(1275, 1, w19p)    doCreateItem(1275, 1, w20p)    doCreateItem(1275, 1, w21p)    doCreateItem(1281, 1, w22p)    doCreateItem(1276, 1, w23p)    doCreateItem(1276, 1, w24p)    doCreateItem(1276, 1, w25p)    doCreateItem(1276, 1, w26p)    doCreateItem(1276, 1, w27p)    doCreateItem(1276, 1, w28p)    doCreateItem(1276, 1, w29p)    doCreateItem(1276, 1, w30p)    doCreateItem(1276, 1, w31p)    doCreateItem(1276, 1, w32p)    doCreateItem(1276, 1, w33p)    doCreateItem(1275, 1, w34p)    doCreateItem(1275, 1, w35p)    doCreateItem(1275, 1, w36p)    doCreateItem(1275, 1, w37p)    doCreateItem(1275, 1, w38p)    doCreateItem(1275, 1, w39p)    doCreateItem(1275, 1, w40p)    doCreateItem(1275, 1, w41p)    doCreateItem(1275, 1, w42p)        doSendMagicEffect(sw2p, 12)  elseif item.itemid == 2712 then    w1 = getThingfromPos(w1p)    w2 = getThingfromPos(w2p)    w3 = getThingfromPos(w3p)    w4 = getThingfromPos(w4p)    w5 = getThingfromPos(w5p)    w6 = getThingfromPos(w6p)    w7 = getThingfromPos(w7p)    w8 = getThingfromPos(w8p)    w9 = getThingfromPos(w9p)    w10 = getThingfromPos(w10p)    w11 = getThingfromPos(w11p)    w12 = getThingfromPos(w12p)    w13 = getThingfromPos(w13p)    w14 = getThingfromPos(w14p)    w15 = getThingfromPos(w15p)    w16 = getThingfromPos(w16p)    w17 = getThingfromPos(w17p)    w18 = getThingfromPos(w18p)    w19 = getThingfromPos(w19p)    w20 = getThingfromPos(w20p)    w21 = getThingfromPos(w21p)    w22 = getThingfromPos(w22p)    w23 = getThingfromPos(w23p)    w24 = getThingfromPos(w24p)    w25 = getThingfromPos(w25p)    w26 = getThingfromPos(w26p)    w27 = getThingfromPos(w27p)    w28 = getThingfromPos(w28p)    w29 = getThingfromPos(w29p)    w30 = getThingfromPos(w30p)    w31 = getThingfromPos(w31p)    w32 = getThingfromPos(w32p)    w33 = getThingfromPos(w33p)    w34 = getThingfromPos(w34p)    w35 = getThingfromPos(w35p)    w36 = getThingfromPos(w36p)    w37 = getThingfromPos(w37p)    w38 = getThingfromPos(w38p)    w39 = getThingfromPos(w39p)    w40 = getThingfromPos(w40p)    w41 = getThingfromPos(w41p)    w42 = getThingfromPos(w42p)         doRemoveItem(w1.uid, 1)    doRemoveItem(w2.uid, 1)    doRemoveItem(w3.uid, 1)    doRemoveItem(w4.uid, 1)    doRemoveItem(w5.uid, 1)    doRemoveItem(w6.uid, 1)    doRemoveItem(w7.uid, 1)    doRemoveItem(w8.uid, 1)    doRemoveItem(w9.uid, 1)    doRemoveItem(w10.uid, 1)    doRemoveItem(w11.uid, 1)    doRemoveItem(w12.uid, 1)    doRemoveItem(w13.uid, 1)    doRemoveItem(w14.uid, 1)    doRemoveItem(w15.uid, 1)    doRemoveItem(w16.uid, 1)    doRemoveItem(w17.uid, 1)    doRemoveItem(w18.uid, 1)    doRemoveItem(w19.uid, 1)    doRemoveItem(w20.uid, 1)    doRemoveItem(w21.uid, 1)    doRemoveItem(w22.uid, 1)    doRemoveItem(w23.uid, 1)    doRemoveItem(w24.uid, 1)    doRemoveItem(w25.uid, 1)    doRemoveItem(w26.uid, 1)    doRemoveItem(w27.uid, 1)    doRemoveItem(w28.uid, 1)    doRemoveItem(w29.uid, 1)    doRemoveItem(w30.uid, 1)    doRemoveItem(w31.uid, 1)    doRemoveItem(w32.uid, 1)    doRemoveItem(w33.uid, 1)    doRemoveItem(w34.uid, 1)    doRemoveItem(w35.uid, 1)    doRemoveItem(w36.uid, 1)    doRemoveItem(w37.uid, 1)    doRemoveItem(w38.uid, 1)    doRemoveItem(w39.uid, 1)    doRemoveItem(w40.uid, 1)    doRemoveItem(w41.uid, 1)    doRemoveItem(w42.uid, 1)         doSendMagicEffect(sw2p, 2)  endendfunction checkSw(item) if item.itemid == 2711 then    doTransformItem(item.uid, 2712) elseif item.itemid == 2712 then    doTransformItem(item.uid, 2711) endendfunction checkItems(dh, ep, gl)  if dh.itemid == 3325 and ep.itemid == 3304 and gl.itemid == 3302 then     return 1  else     return 0  endendfunction rcItems(dh, ep, gl, dhp, epp, glp, mlsp)  doRemoveItem(dh.uid, 1)  doRemoveItem(ep.uid, 1)  doRemoveItem(gl.uid, 1)    doSendMagicEffect(dhp, 1)  doSendMagicEffect(epp, 1)  doSendMagicEffect(glp, 1)  doCreateItem(3216, 1, mlsp)  doSendMagicEffect(mlsp, 14)end

 

Em actions.xml:

 

<action uniqueid="uid_sw1" script="nomedosript.lua"/><action uniqueid="uid_sw2" script="nomedosript.lua"/>

 

pedsup36rv.jpg

Considerações e explicações:

*Não foi possível fazer com que ele criasse uma alavanca e esta servisse para a action, para contornar isso eu já criei as duas alavancas pelo mapeditor, e coloquei um uid em cada uma (Obs.:A segunda switch só funciona com as paredes criadas, isto é, após usar a primeira switch)

*sw1_uid/sw2_uid: uids das respectivas switchs

*p_z: z de onde acontece tudo

*w1_x/y...:coordenadas das walls (é de extrema importância seguir a orientação da figura)

*dh_x/y...: coordenadas de onde devem estar os items

*mls_x/y: coordenadas de onde será criada a mls

*358 linhas de códigos foi mole não...

Link para o comentário
Compartilhar em outros sites

@efew

quanto a bixo, você poe se você quiser!

pois no meu server, vai ser bem dificil cair e-plate, g-legs e D-helmet soh em quest!

ou seja...bixo num eh dificil...e caso voce queira por, eh soh fzr um "castelo" cheio de bixo!

^^

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
  • 2 weeks later...
Caraca que quest loka oO

So num sei se vale apena perder 3 coisas boa.

Por 1 só xP

A nao ser que o item da quests seja MTOOOO BOA!

Zynex, eh soh trocar os IDS das armas que vc quiser, assim oh:

function checkItems(dh, ep, gl)

if dh.itemid == 3325 and ep.itemid == 3304 and gl.itemid == 3302 then

Ali os IDS vc troka.

f

u

i

~~~~~Edited ~~~~~

Putx agora q eu vi o "and" ali, tah errado ??

Sera q eh por isso q num tah pegando ???

aff

responde ai como troka os itens !!!

f

u

i

~~~~~Edited ~~~~~

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...