Ai galera, procurei no forum mas não achei nenhuma das Novas Potions, criadas pela CipSoft na atual versão do Tibia (8.1).
Peguei da Versão Aries 0.4 (créditos Equip Aries), só estou passando a vocês.
Agora vou ensinar vocês a criarem as 6 Novas Potions:
-Great Health Pot
-Great Mana Pot
-Strong Health Pot
-Strong Mana Pot
-Health Pot
-Mana Pot
1º Passo - Criar as actions
Vá em data/actions/scripts, copie um arquivo lua qualquer renomeie para Potions.lua e apague tudo de dentro e bote isto:
local strongHealthPot = 7588 local strongManaPot = 7589 local healthPot = 7618 local manaPot = 7620 local greatEmptyPot = 7635 local strongEmptyPot = 7634 local emptyPot = 7636 function onUse(cid, item, frompos, item2, topos) if(exhaust(cid, storevalue, exhausttime) == 1) then if(item.itemid == healthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 150, 210, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, emptyPot) elseif(item.itemid == manaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 70, 110, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, emptyPot) elseif(item.itemid == strongHealthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 320, 420, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, strongEmptyPot) elseif(item.itemid == strongManaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 150, 220, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, strongEmptyPot) elseif(item.itemid == greatHealthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 650, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, greatEmptyPot) elseif(item.itemid == greatManaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 250, 320, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, greatEmptyPot) end else doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(frompos, 2) end return TRUE end
Onde você pode editar eles:
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 170, 230, CONST_ME_MAGIC_BLUE) if(doTargetCombatMana(0, cid, [color="#FF0000"]170[/color], [color="#FF0000"]230[/color], CONST_ME_MAGIC_BLUE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, [color="#FF0000"]300[/color], [color="#FF0000"]500[/color], CONST_ME_MAGIC_BLUE) if(doTargetCombatMana(0, cid, [color="#FF0000"]300[/color], [color="#FF0000"]500[/color], CONST_ME_MAGIC_BLUE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, [color="#FF0000"]500[/color], [color="#FF0000"]800[/color], CONST_ME_MAGIC_BLUE) if(doTargetCombatMana(0, cid, [color="#FF0000"]500[/color], [color="#FF0000"]800[/color], CONST_ME_MAGIC_BLUE)
Onde ta escrito em vermelho é onde você arruma o quanto de HP ou Mana ele vai recuperar.
2º Passo - Ligar as actions àos itens (potions)
Vá na pasta actions/actions.xml, abrá-o como bloco de notas e adicione isto:
<!-- Potions --> <action itemid="7588" script="potions.lua" /> <action itemid="7589" script="potions.lua" /> <action itemid="7590" script="potions.lua" /> <action itemid="7591" script="potions.lua" /> <action itemid="7618" script="potions.lua" /> <action itemid="7620" script="potions.lua" />
Isso são as actions de cada um das Novas Potions.
E agora adicionando elas no items.xml para aqueles que não tem. Abra o Items.xml e adicione isto:
<item id="7620" article="a" name="mana potion"> <attribute key="weight" value="180"/> <item id="7618" article="a" name="health potion"> <attribute key="weight" value="180"/> </item> <item id="7588" article="a" name="strong health potion"> <attribute key="weight" value="200"/> <attribute key="description" value="This potion can only be consumed by paladins and knights of level 80 or higher."/> </item> <item id="7589" article="a" name="strong mana potion"> <attribute key="weight" value="200"/> <attribute key="description" value="This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher."/> </item> <item id="7590" article="a" name="great mana potion"> <attribute key="weight" value="220"/> <attribute key="description" value="This potion can only be consumed by sorcerers and druids of level 80 or higher."/> </item> <item id="7591" article="a" name="great health potion"> <attribute key="weight" value="220"/> <attribute key="description" value="This potion can only be consumed by sorcerers and druids of level 80 or higher."/> </item>
Pronto, estão adicionadas no items.xml
As Novas Potoins ja estão criadas! Agora vamos bota no NPC para poder vender elas.
3º Passo - Colocando o npc para vende-las
Abra a pasta npc/scripts/seller.lua(não nescessáriamente deve ser o Seller, você bota no npc que quiser!), então abra o npc que deseja vender e adicione isto:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell ropes (50gp), shovels (20gp), backpacks (10gp), manafluids (100gp), lifefluids (60gp), health pot (150gp), mana pot (100gp), stronghealth pot (300gp), greathealth pot (500gp), greatmana pot (450gp), strongmana pot (250gp), fishing rods (100gp), amulet of loss (10k), and torches (2gp). I buy vials (10gp).')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'shovel') then
buy(cid,2554,getCount(msg),20)
elseif msgcontains(msg, 'backpack') then
buy(cid,1988,getCount(msg),10)
elseif msgcontains(msg, 'rope') then
buy(cid,2120,getCount(msg),40)
elseif msgcontains(msg, 'manafluid') or msgcontains(msg, 'mana fluid') then
buyFluidContainer(cid,2006,getCount(msg),100,7)
elseif msgcontains(msg, 'lifefluid') or msgcontains(msg, 'life fluid') then
buyFluidContainer(cid,2006,getCount(msg),60,10)
elseif msgcontains(msg, 'fishing rod') then
buy(cid,2580,getCount(msg),100)
elseif msgcontains(msg, 'torch') then
buy(cid,2050,getCount(msg),2)
elseif msgcontains(msg, 'aol') then
buy(cid,2173,getCount(msg),10000)
elseif msgcontains(msg, 'vial') or msgcontains(msg, 'flask') then
sell(cid,2006,getCount(msg),10)
elseif msgcontains(msg, 'mana potion') or msgcontains(msg, 'mp') then
buy(cid,7620,getCount(msg),100)
elseif msgcontains(msg, 'health potion') or msgcontains(msg, 'hp') then
buy(cid,7618,getCount(msg),150)
elseif msgcontains(msg, 'strongmana potion') or msgcontains(msg, 'smp') then
buy(cid,7589,getCount(msg),250)
elseif msgcontains(msg, 'stronghealth potion') or msgcontains(msg, 'shp') then
buy(cid,7588,getCount(msg),300)
elseif msgcontains(msg, 'greatmana potion') or msgcontains(msg, 'gmp') then
buy(cid,7590,getCount(msg),400)
elseif msgcontains(msg, 'greathealth potion') or msgcontains(msg, 'ghp') then
buy(cid,7591,getCount(msg),500)
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
Pronto terminei espero que gostem ![]()
Créditos 50% a mim por criar as potions ( shynzo )
e 50 % ao meu amigo Zikpeta por aolocalas no npc( não é do Xtibia )






















