Postado Maio 1, 2015 10 anos Autor Alguem para me ajudar? Ainda nao consegui resolver meu problema!!!
Postado Maio 4, 2015 10 anos Autor Solução Alguma alma boa aqui que pode me ajudar??? Eu acabei de descobrir que meu TFS ta usando um script dentro da pasta other, o script potions.lua a seguid: Citar local ultimateHealthPot = 8473 local greatHealthPot = 7591 local greatManaPot = 7590 local greatSpiritPot = 8472 local strongHealthPot = 7588 local strongManaPot = 7589 local healthPot = 7618 local manaPot = 7620 local smallHealthPot = 8704 local antidotePot = 8474 local greatEmptyPot = 7635 local strongEmptyPot = 7634 local emptyPot = 7636 local antidote = createCombatObject() setCombatParam(antidote, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(antidote, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(antidote, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE) setCombatParam(antidote, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(antidote, COMBAT_PARAM_DISPEL, CONDITION_POISON) local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (configManager.getNumber(configKeys.EX_ACTIONS_DELAY_INTERVAL) - 100)) -- 1000 - 100 due to exact condition timing. -100 doesn't hurt us, and players don't have reminding ~50ms exhaustion. function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid ~= 1 or itemEx.type ~= THING_TYPE_PLAYER then return true end if(getCreatureCondition(cid, CONDITION_EXHAUST_HEAL) == true) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(item.itemid == antidotePot) then if(doCombat(itemEx.uid, antidote, numberToVariant(itemEx.uid)) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, emptyPot, 0) elseif(item.itemid == smallHealthPot) then if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 50, 100, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, emptyPot, 0) elseif(item.itemid == healthPot) then if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 100, 200, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, emptyPot, 0) elseif(item.itemid == manaPot) then if(doTargetCombatMana(0, itemEx.uid, 70, 130, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, emptyPot, 0) elseif(item.itemid == strongHealthPot) then if(not(isKnight(itemEx.uid) or isPaladin(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 50)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(itemEx.uid, "This potion can only be consumed by paladins and knights of level 50 or higher.", TALKTYPE_ORANGE_1) return true end if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, strongEmptyPot, 0) elseif(item.itemid == strongManaPot) then if(not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid) or isPaladin(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 50)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(itemEx.uid, "This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher.", TALKTYPE_ORANGE_1) return true end if(doTargetCombatMana(0, itemEx.uid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, strongEmptyPot, 0) elseif(item.itemid == greatSpiritPot) then if(not(isPaladin(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 80)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(itemEx.uid, "This potion can only be consumed by paladins of level 80 or higher.", TALKTYPE_ORANGE_1) return TRUE end if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR or doTargetCombatMana(0, itemEx.uid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return true end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, greatEmptyPot, 0) elseif(item.itemid == greatHealthPot) then if(not(isKnight(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 80)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(itemEx.uid, "This potion can only be consumed by knights of level 80 or higher.", TALKTYPE_ORANGE_1) return true end if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 500, 700, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, greatEmptyPot, 0) elseif(item.itemid == greatManaPot) then if(not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 80)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(itemEx.uid, "This potion can only be consumed by sorcerers and druids of level 80 or higher.", TALKTYPE_ORANGE_1) return true end if(doTargetCombatMana(0, itemEx.uid, 350, 450, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, greatEmptyPot, 0) elseif(item.itemid == ultimateHealthPot) then if(not(isKnight(itemEx.uid)) or (getPlayerLevel(itemEx.uid) < 130)) and not(getPlayerGroupId(itemEx.uid) >= 2) then doCreatureSay(cid, "This potion can only be consumed by knights of level 130 or higher.", TALKTYPE_ORANGE_1) return true end if(doTargetCombatHealth(0, itemEx.uid, COMBAT_HEALING, 750, 900, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return false end doAddCondition(cid, exhaust) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, greatEmptyPot, 0) end return true end Resolvi o meu problema atraves deste topico aqui: http://www.tibiaking.com/forum/topic/47758-potionslua/ Topico fechado Editado Maio 4, 2015 10 anos por crupie (veja o histórico de edições)
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.