Ir para conteúdo
Entre para seguir isso  
ChuckNoya

[8.54] Colocando Potion Infinitas!

Recommended Posts

ChuckNoya    6
ChuckNoya

Eae Bandicu (Y)

 

Fiz Esse topico Para Ajudar O GOD Do Ot vitaminadebanana.servegame.com

OiaeuMae

 

Agora Vou Ensinar a Colocar Potion infinita Em Seu Otserv!

 

Abra a Pasta De Seu Otserv ! [\FATO :yes:

 

Va Em Data Depois Actions Depois Scripts Depois Liquids

 

Abra o Arquivo Potions.lua e Tire Tudo Escrito Assim - doTransformItem(item.uid, potion.empty)

 

Pronto! Salve o Arquivo e Seja Feliz!

 

\/ Potions Não Infinitas \/

local config = {

removeOnUse = "no",

usableOnTarget = "yes", -- can be used on target? (fe. healing friend)

splashable = "no",

realAnimation = "no", -- make text effect visible only for players in range 1x1

healthMultiplier = 1.0,

manaMultiplier = 1.0

}

 

config.removeOnUse = getBooleanFromString(config.removeOnUse)

config.usableOnTarget = getBooleanFromString(config.usableOnTarget)

config.splashable = getBooleanFromString(config.splashable)

config.realAnimation = getBooleanFromString(config.realAnimation)

 

local POTIONS = {

[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion

[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion

[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion

[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion

[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

 

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion

[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion

[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

 

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion

}

 

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local potion = POTIONS[item.itemid]

if(not potion) then

return false

end

 

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then

if(not config.splashable) then

return false

end

 

if(toPosition.x == CONTAINER_POSITION) then

toPosition = getThingPos(item.uid)

end

 

doDecayItem(doCreateItem(2016, potion.splash, toPosition))

doTransformItem(item.uid, potion.empty)

return true

end

 

if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)

return true

end

 

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and

not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))

then

doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)

return true

end

 

local health = potion.health

if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then

return false

end

 

local mana = potion.mana

if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then

return false

end

 

doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)

if(not realAnimation) then

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)

else

for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do

if(isPlayer(tid)) then

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)

end

end

end

 

doAddCondition(cid, exhaust)

if(not potion.empty or config.removeOnUse) then

doRemoveItem(item.uid)

return true

end

 

doTransformItem(item.uid, potion.empty)

return true

end

________________________________________________________________

 

Em Vermelho É Oque Deve Ser Removido!

Após Remover Ficara Assim!

 

local config = {

removeOnUse = "no",

usableOnTarget = "yes", -- can be used on target? (fe. healing friend)

splashable = "no",

realAnimation = "no", -- make text effect visible only for players in range 1x1

healthMultiplier = 1.0,

manaMultiplier = 1.0

}

 

config.removeOnUse = getBooleanFromString(config.removeOnUse)

config.usableOnTarget = getBooleanFromString(config.usableOnTarget)

config.splashable = getBooleanFromString(config.splashable)

config.realAnimation = getBooleanFromString(config.realAnimation)

 

local POTIONS = {

[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion

[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion

[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion

[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion

[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

 

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion

[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion

[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

 

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion

}

 

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local potion = POTIONS[item.itemid]

if(not potion) then

return false

end

 

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then

if(not config.splashable) then

return false

end

 

if(toPosition.x == CONTAINER_POSITION) then

toPosition = getThingPos(item.uid)

end

 

doDecayItem(doCreateItem(2016, potion.splash, toPosition))

 

return true

end

 

if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)

return true

end

 

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and

not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))

then

doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)

return true

end

 

local health = potion.health

if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then

return false

end

 

local mana = potion.mana

if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then

return false

end

 

doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)

if(not realAnimation) then

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)

else

for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do

if(isPlayer(tid)) then

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)

end

end

end

 

doAddCondition(cid, exhaust)

if(not potion.empty or config.removeOnUse) then

doRemoveItem(item.uid)

return true

end

 

 

return true

end

 

________________________________________________________________

 

Duvidas?!

MSN:[email protected]

 

________________________________________________________________

 

Toda Action Tem Uma Reaction :pirate:

Compartilhar este post


Link para o post
andurinha94    0
andurinha94

eu tenho um yurots ali, e ele nao tem esses scripts!

como eu faço agora? eu pego o script de onde?

Compartilhar este post


Link para o post
Nenzzy    0
Nenzzy

Simples & Eficaz

Aprovado.

Compartilhar este post


Link para o post
dragonlorde    0
dragonlorde
Simples & Eficaz

Aprovado.

 

Você virou moderador agora?

 

Topic--

Muito bom cara tem sempre gente perguntando isso na secção de suporte la...

É bem util ate isso so que não sei se precisava tutorial pra isso :errm:

Compartilhar este post


Link para o post
Pandá s2    0
Pandá s2

Muito bom Potion, só acho que ela tira o RPG do tibia, mesmo assim sei que suas intenções são as melhores, Parabéns pelo Tutor.

 

Obrigado

Compartilhar este post


Link para o post
kaiolokoxdlol    0
kaiolokoxdlol

nossa me ajuda muito obrigado ^^

Compartilhar este post


Link para o post
GMMM    0
GMMM

aki n funfo

Compartilhar este post


Link para o post
LordBelkil    2
LordBelkil

@vitorlindo123

Reportado~*

 

@topic

Isso ai eu ja sabia, mas vai ajudar muito os que não sabem...

Compartilhar este post


Link para o post
MMizael    0
MMizael

muito bom

 

 

aprovado:yes:

Compartilhar este post


Link para o post
ADM Danger    0
ADM Danger

Vlw kara me ajudo com meu OT

APROVADO.

Compartilhar este post


Link para o post
MMizael    0
MMizael

nada como uma ultimate health pot infinita:coolface:... axo que esse script ai não pega em qualquer ot não, você deve informar em que server você testou ele se não complica...

Compartilhar este post


Link para o post
chico1258    0
chico1258

que eu saiba as potions infinitas ja pode escolher pelo config.lua

mais mesmo assim APROVADO.

Att

Compartilhar este post


Link para o post
MMizael    0
MMizael

[b]Originalmente por Chico1258[/b]
que eu saiba as potions infinitas ja pode escolher pelo config.lua
mais mesmo assim APROVADO.
Att

 

 

 

em nenhum ot eu vi que podia por pot infinita pelo Config.Lua :fuu:

Compartilhar este post


Link para o post
josep    0
josep

Muito legal, ajudou muitas pessoas e também eu.

Aprovado.

Compartilhar este post


Link para o post
HaUUBa    0
HaUUBa

Eh bem legal,

Mas eu queria msm eh saber como faz para que as Potions

em vez de Infinitas

Cada uma durar 20x.

 

Alguem sabe?!

Compartilhar este post


Link para o post
vitorlindo123    0
vitorlindo123

sorte sua que nao é aquele fdp com a foto do irmao urso pra ve se fecha ou aprova

Compartilhar este post


Link para o post
Asmo deuss    0
Asmo deuss

Isso é bom para quem tem um ot enforced como eu. Mas tambem para um servidor com uma xp alta, colocar uma quest com uma potion infinita é bacana, já fiz isso e deu certo.

Compartilhar este post


Link para o post
blinkheart    0
blinkheart

Mas isso adianta?

Pelo q entendo tiramos a tag de se transformar em pot vazia

mas continua dando pra usar ?

Compartilhar este post


Link para o post
ChuckNoya    6
ChuckNoya

Sim Continua Dando Para Usar a Potion :)

 

nada como uma ultimate health pot infinita... axo que esse script ai não pega em qualquer ot não, você deve informar em que server você testou ele se não complica...

 

Todos Que Eu Testei Funfo

Slayer , Styller , Alissow , Naxted enfim a Maioria :)

Compartilhar este post


Link para o post
galarca    0
galarca

Ótimo vlw

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×