CL

Perfect Desintegrate

Por Claverockz, 30 de mai. de 2006 em Actions e Talkactions

otserv
tibia
script
4
2.4k
ClaverockzC
30 de maio de 2006 às 00:53

Aew Spell Tirada do Otfans...não sei se é uma spell mesmo...pois é feita em actions...

Vá n pasta data/actions/scripts e crie um arquivo chamado desintegrate.lua...

e adicione isto

 

function onUse(cid, item, frompos, item2, topos)if item2.itemid == 0 thenreturn 0end destroy = {x=topos.x, y=topos.y, z=topos.z, stackpos=255}destroyitem = getThingfromPos(destroy)playerpos = getPlayerPosition(cid)pz = getTilePzInfo(destroy)pz1 = getTilePzInfo(playerpos)storevalue = 1002exhausttime = 1ml = getPlayerMagLevel(cid)function exhaust(cid, storevalue, exhausttime)        newExhaust = os.time()    oldExhaust = getPlayerStorageValue(cid, storevalue)    if (lastexhaust == nil or lastexhaust < 0) then        lastexhaust = 0    end    if (exhausttime == nil or exhausttime < 0) then        exhausttime = 1    end    diffTime = os.difftime(newExhaust, oldExhaust)    if (diffTime >= exhausttime) then        setPlayerStorageValue(cid, storevalue, newExhaust)         return 1    else        return 0    endend    if (ml >= 4) then        if (exhaust(cid, 1002, 1) > 0) then          if destroyitem.itemid > 0 then              if (pz1 == 0) then                if (pz == 0) then              doRemoveItem(destroyitem.uid,1)              doChangeTypeItem(item.uid, item.type-1)              if item.type == 1 then                 doRemoveItem(item.uid, 1)              end                 doSendMagicEffect(topos, 2)          else        doSendMagicEffect(frompos, 2)             doPlayerSendCancel(cid, "This action is not permited while you are in protect zone.")          end           else        doSendMagicEffect(frompos, 2)             doPlayerSendCancel(cid, "This action is not permited while you are in protect zone.")          end           else        doSendMagicEffect(frompos, 2)             doPlayerSendCancel(cid, "You can not use this object.")          end           else        doSendMagicEffect(frompos, 2)             doPlayerSendCancel(cid, "You are exhausted.")          end           else        doSendMagicEffect(frompos, 2)             doPlayerSendCancel(cid, "You dont have the required magic level to use that rune.")    end    return 1end

 

e vá em actions.xml e adicione isto

 

<action itemid="[color=red]2310[/color]" script="desintegrate.lua" />

Esta spell não foi crada por mim... todos os direitos reservado para o Rafacin, so tive o trabalho de passar para o Xtibia... se eu tiver postado no lugar errado malz =x

KendriusK
30 de maio de 2006 às 21:11

Parece que não é uma spells não O.o's.

Parece aquele codigo que você usa "USE" em sua arma e clica numa cadeira ela quebra.

Abraços,

Kendrius.

ClaverockzC
30 de maio de 2006 às 22:47

Se não for eu pesso para os moderadores mudarem =x

malz

x9killX
31 de maio de 2006 às 17:44

isso é um action meio spell =P, mas como deve estar na pasta actions, também irei mover para actions =D