Ir para conteúdo
  • Cadastre-se

(Resolvido)[PEDIDO] Retirando os vial


Ir para solução Resolvido por Caronte,

Posts Recomendados

retire essa parte:

doPlayerAddItem(cid, potion.empty, 1)
só.

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Link para o post
Compartilhar em outros sites
  • Respostas 11
  • Created
  • Última resposta

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Posts

de nada, lembra de postar pra não passar sufoco , não só problemas mas dúvidas de como fazer as coisas sem problemas

[8704] = {empty = no, splash = 2, health = {50, 100}}, -- small health potion      (funcionou assim ,sera que troco ??)

Link para o post
Compartilhar em outros sites
local config = {
removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
range = -1,
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))
doRemoveItem(item.uid, 1)
 
return true
end
 
if(hasCondition(cid, CONDITION_EXHAUST)) 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
 
if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then
return false
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 config.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)
doRemoveItem(item.uid, 1)
if(not potion.empty or config.removeOnUse) then
return true
end
 
return true
end

^^

0hbk.png

Link para o post
Compartilhar em outros sites
Link para o post
Compartilhar em outros sites
  • Solução

sobre a sua sociedade que você ta procurando, está bem na sua frente uma bem grande que não precisa de remuneração, só uma pitada de respeito e educação estaremos em prontidão, para tudo que você precisar , é o Tíbia King

Como eu disse , é só remover odoPlayerAddItem(cid, potion.empty, 1)

mas se não tem erro,significa que:

doPlayerAddItem(cid, no, 1)

não está dando problema na sua distro

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Yago Blind.
      Salve galera do TK , estou tendo 2 problemas com meu servidor e não estou conseguindo solucionar . Vejam se podem me ajudar.

      1°[PEDIDO] Queria um comando "!Stamina" que recupere-se toda a stamina do player por 500k.
       
      2°[DUVIDA] Fiz um esquema de um topic que vi aqui mesmo no TK , de como fazer o pally usar a potion e continuar batendo ao mesmo tempo e não funcionou foi o de adicionar no weapons.xml na linha de Ammunitions o comando swing="true" e não funcionou , como faço agora ??
       
       
    • Por crupie
      Fala galera tudo bem?
       
      Eu criei um server recentemente e estou tendo um probleminha, venho procurando isso a um tempo e nao acho nenhuma soluçao para o meu problema.
       
       
      Meu servidor esta com poçoes infinitas, eu ja mudei o meu potions para remover ao usar.
      deem uma olhada no meu potions.lua
       
       
      Se alguem souber onde que eu possa mudar para remover as pots infinitas, favor me indicar.
       
      Obrigado
    • Por Enzoo
      Meu ot tem alavancas no ultimo andar do dp,porém queria colocar elas no templo,e essas que tem no dp,vem apenas 20 potions juntamente com uma backpack,gostaria de qnd clicasse,vim 100 potions porém sem backpack.
    • Por Enzo Caue
      Pra quem baixou recentemente a atualização V5 do @Mitsuig, o servidor veio com um bug nas potions, onde você usando qualquer potion ele apresentava um erro no console e a potion ficava infinita.. 
       

       
      Consegui arrumar e venho compartilhar com vocês.
       
      Em data/lib/StorageTables.lua, troque o que está lá por este :
      Storage = { OutfitQuest = { DefaultStart = 12010, -- Is needed for each Quest to start the log NightmareOutfit = 50083, BrotherhoodOutfit = 50084, ShamanAddons = 50085 }, pitsOfInfernoPumin = 50096, -- Promotion Storage cannot be changed, it is set in source code Promotion = 30018, FriendsandTraders = { DefaultStart = 12400, TheSweatyCyclops = 12401, TheMermaidMarina = 12402, TheBlessedStake = 12403, TheBlessedStakeWaitTime = 12404 }, SvargrondArena = { Arena = 1100, Pit = 1101 }, thievesGuild = { Quest = 12501, Mission01 = 12502, Mission02 = 12503, Mission03 = 12504, Mission04 = 12505, Mission05 = 12506, Mission06 = 12507, Mission07 = 12508, Mission08 = 12509, Door = 12510, Reward = 12513, TheatreScript = 12514 }, -- Achievement storages Achievements = { PotionAddict = 50562, AllowanceCollector = 50563, Bluebarian = 50564, WildWarrior = 50565, DoctorDoctor = 50566, Masquerader = 50567, InteriorDecorator = 50568 }, } Reinicie o server e pronto :]
       
      Créditos :
      imkimgran - otland
    • Por luanluciano93
      Olá pessoal, como to mexendo em um servidor "baiak" tive a ideia de fazer esse sistema de alavanca (pedi ajuda para o MaXwEllDeN, que foi quem fez praticamente o script inteiro), o script é formado por 2 alavancas., onde uma é para life e outra para mana, e essas alavancas vendem potions em cargas de 100x, a diferença dela é que ela verifica a vocation e o level do player, e vendi o potion em função disso. Por exemplo: Knight com level inferior a 50 só pode usar health potion, então se ele clicar na alavanca de life, ele irá receber o health potion, mas se este knight estiver em um level supior a 50 e inferior a 80 irá receber um strong potion, e assim sucessivamente.

      Faça pelo seu RME algo parecido com isso:



      Agora coloque a actionid 20001 na alavanca de life e 20002 na alavanca de mana ... 
       

       
      Depois vá em actions/actions.xml e add a tag: 
      <!-- Alavanca Potions --> <action actionid="20001" script="alavanca_potions.lua"/> <action actionid="20002" script="alavanca_potions.lua"/> E por fim, em actions/scripts/ crie um arquivo chamado alavanca_potions.lua e adicione isso dentro: 
       
       
      É isso pessoal, os créditos são todos do MaXwEllDeN. Até mais!
  • Estatísticas dos Fóruns

    96846
    Tópicos
    519602
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo