Jump to content

Question

6 answers to this question

Recommended Posts

  • 0
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

Link to comment
https://xtibia.com/forum/topic/189372-potion/#findComment-1289776
Share on other sites

  • 0
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
Link to comment
https://xtibia.com/forum/topic/189372-potion/#findComment-1290116
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...