XM
pedido

Potion

Por xmaster0, 07 de jul. de 2012 em Scripts

potion
script
7
2.1k
xmaster0X
07 de julho de 2012 às 12:03

Preciso de script de potion exemplo , small potion(CURA AMARELO)fraco , great potion(CURA VERDE),mais ou menos,ultra potion,(CURA AZUL),bom,hyper potion(CURA VERMELHO),otimo,full potion (CURA DOURADO),cura todo life exelente, como faço isso?

caoticC
07 de julho de 2012 às 12:17

explica melhor para uma (target,player,summon e etc...)

xmaster0X
07 de julho de 2012 às 12:42

assim eu queria 5 potion de diferente cores amarelo, verde , azul , vermelho , dourado, cada um melhor que o outro, preciso dos scripts entendeu?

caoticC
07 de julho de 2012 às 12:57

ate agora nao entendi vc quer os itens o script.

 

Se for o script ele cura quem e como.

 

Explique melhor

xmaster0X
07 de julho de 2012 às 15:31
ate agora nao entendi vc quer os itens o script. Se for o script ele cura quem e como. Explique melhor

 

cara eu queria script de potion, mas queria 5 , , Small Potion, Great Potion, Ultra Potion, Hyper Potion,Full Potion, lembrando que nao tenho nem um desse pot no meu serv eu queria adicionar entendeu... um que cura menos e outro que cura maiis

caoticC
07 de julho de 2012 às 18:11

então e so mandar o script do seu otserv.

xmaster0X
08 de julho de 2012 às 12:57
então e so mandar o script do seu otserv.

 

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

 

if isPlayer(item2.uid) then

return doPlayerSendCancel(cid, "You can only use potions on pokemons!")

end

 

if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendCancel(cid, "Sorry, you can't heal your pokemon during fights!")

return TRUE

end

 

if not isCreature(item2.uid) then

return doPlayerSendCancel(cid, "You can only use potions on pokemons!")

end

 

if not isPlayer(getCreatureMaster(item2.uid)) then

return doPlayerSendCancel(cid, "You cant use potions on wild pokemons.")

end

 

if getCreatureHealth(item2.uid) == getCreatureMaxHealth(item2.uid) then

return doPlayerSendCancel(cid, "This pokemon is already at full health.")

end

 

if getPlayerStorageValue(item2.uid, 173) >= 1 then

return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.")

end

 

getCreatureName(item2.uid)

 

local summonName = getItemAttribute(tmp, "apelido")

if summonName == nil then

summonName = getItemAttribute(tmp, "poke"):match("This is (.-)'s pokeball.")

end

 

doCreatureSay(cid, ""..summonName..", take this potion!", TALKTYPE_SAY)

doSendMagicEffect(getThingPos(item2.uid), 172)

doRemoveItem(item.uid, 1)

setPlayerStorageValue(item2.uid, 173, 1)

local function heal(params)

if isCreature(params.item2) then

if getPlayerStorageValue(item2.uid, 173) >= 2 then

return true

end

if (getCreatureCondition(params.cid, CONDITION_INFIGHT) == true) then

doSendAnimatedText(getThingPos(params.item2), "LOST HEAL", 215)

setPlayerStorageValue(item2.uid, 173, 2)

return true

end

if getCreatureHealth(params.item2) == getCreatureMaxHealth(params.item2) then

return true

end

 

local lvl = getPlayerLevel(cid)

 

if item.itemid == 2272 then

doSendMagicEffect(getThingPos(params.item2), 12)

doCreatureAddHealth(item2.uid, lvl*10)

elseif item.itemid == 2274 then

doSendMagicEffect(getThingPos(params.item2), 14)

doCreatureAddHealth(item2.uid, lvl*20)

elseif item.itemid == 2271 then

doSendMagicEffect(getThingPos(params.item2), 13)

doCreatureAddHealth(item2.uid, lvl*30)

elseif item.itemid == 2275 then

doSendMagicEffect(getThingPos(params.item2), 13)

doCreatureAddHealth(item2.uid, lvl*60)

end

end

end

 

local function noskull(params)

if isCreature(params.item2) then

setPlayerStorageValue(item2.uid, 173, 0)

end

end

 

local item2 = item2.uid

addEvent(heal, 1200, {cid = cid, item2 = item2})

addEvent(heal, 2400, {cid = cid, item2 = item2})

addEvent(heal, 3600, {cid = cid, item2 = item2})

addEvent(heal, 4800, {cid = cid, item2 = item2})

addEvent(heal, 6000, {cid = cid, item2 = item2})

addEvent(heal, 7200, {cid = cid, item2 = item2})

addEvent(heal, 8400, {cid = cid, item2 = item2})

addEvent(heal, 9600, {cid = cid, item2 = item2})

addEvent(heal, 10800, {cid = cid, item2 = item2})

addEvent(heal, 12000, {cid = cid, item2 = item2})

addEvent(noskull, 12500, {cid = cid, item2 = item2})

 

return true

end

 

, esse aí é meu potion que está data/action/scripts/potion< lembrando que no meu serve nao funciona a cura, que é um grande problema