Ir para conteúdo

raphastel

Membro
  • Registro em

  • Última visita

  1. raphastel reagiu a uma resposta no tópico: (Resolvido) Ajuda para fazer site
  2. raphastel postou uma resposta no tópico em Suporte Tibia OTServer
    @Caronte, Aqui está a potions.lua local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "yes", range = -1, area = {1, 1} -- if not set correctly, the message will be sent only to user of the item } local multiplier = { health = 1.0, mana = 1.0 } local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 42, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } for index, potion in pairs(POTIONS) do if(type(index) == 'number')then for k, v in pairs(config) do if(not potion[k]) then potion[k] = v end end if(potion.removeOnUse) then potion.removeOnUse = getBooleanFromString(potion.removeOnUse) end if(potion.usableOnTarget) then potion.usableOnTarget = getBooleanFromString(potion.usableOnTarget) end if(potion.splashable) then potion.splashable = getBooleanFromString(potion.splashable) end if(type(potion.health) == 'table' and table.maxn(potion.health) > 1) then potion.health[1] = math.ceil(potion.health[1] * multiplier.health) potion.health[2] = math.ceil(potion.health[2] * multiplier.health) else potion.health = nil end if(type(potion.mana) == 'table' and table.maxn(potion.mana) > 1) then potion.mana[1] = math.ceil(potion.mana[1] * multiplier.mana) potion.mana[2] = math.ceil(potion.mana[2] * multiplier.mana) else potion.mana = nil end POTIONS[index] = potion end end 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 potion.usableOnTarget and cid ~= itemEx.uid)) then if(not potion.splashable or not potion.splash) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(((potion.level and getPlayerLevel(itemEx.uid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(itemEx.uid)))) 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_MONSTER, false, cid) return true end if(potion.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getThingPosition(cid), getThingPosition(itemEx.uid)) > potion.range and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_CANUSEFAR)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_TOOFARAWAY) return true end if(potion.health and not doTargetCombatHealth(cid, itemEx.uid, COMBAT_HEALING, potion.health[1], potion.health[2], CONST_ME_MAGIC_BLUE, false)) then return false end if(potion.mana and not doTargetCombatMana(cid, itemEx.uid, potion.mana[1], potion.mana[2], CONST_ME_MAGIC_BLUE, false)) then return false end if(type(potion.area) == 'table' and table.maxn(potion.area) > 1) then for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), potion.area[1], potion.area[2])) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, tid) end end else doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, itemEx.uid) if(itemEx.uid ~= cid) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, cid) end end doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end Acho que é essa
  3. raphastel postou uma resposta no tópico em Suporte Tibia OTServer
    Ae pessoal to com um probleminha aqui com as minhas pots, n sei pq ta acontecendo isso... Por exemplo, um level 10 não pode usar uma GMP (great mana potion) em si mesmo já que tem que ser level 80 para usar, porém ele pode usar GMP em algum mage level 80+, UHP em knight lvl 130+, GSP em paladin... etc... O kra pode ser até level 1 que ele consegue. data/action/scripts/liquids/great_mana.lua local MIN = 200 local MAX = 300 local EMPTY_POTION = 7635 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) pot_count = getPlayerItemCount(cid, EMPTY_POTION) doPlayerRemoveItem(cid, EMPTY_POTION, pot_count) doPlayerAddItem(cid, EMPTY_POTION, pot_count) return TRUE end
  4. Você acha então que eu devo mudar alguma outra coisa em outra pasta já que continua não tirando a paralyze com o seu código? Sei la alguma coisa na parte do spell.xml não sei ... ---------------------------------------------------------- Ae galera depois de uma semana procurando consegui achar... obrigado a todos que me ajudaram ai, Suicide e ViitinG. Tive que colocar meu light healing.lua assim e está funcionando perfeitamente (o mesmo funciona para todas as magias de cura): local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid, var) if getCreatureCondition(cid,CONDITION_PARALYZE) then doRemoveCondition(cid, CONDITION_PARALYZE) end return doCombat(cid, combat, var) end
  5. Não funcionou nenhum dos 2... sendo que o do ViitinG nem funcionou como spell, e o do Sucide funcionou mas não tira paralyze... Será que tenho que mudar alguma outra coisa alem do ultimate healing.lua?
  6. Eu tive que usar o xamp mais novo, o meu era antigo... feito isso, dei upload direto do zip, vlw ai!
  7. como que eu posso repartir? vc pode fazer isso pra mim? ta ai no link que eu mandei, acho que nao vou saber fazer direito '-'
  8. Estou usando o xampp 2.5 e quando vou importar qualquer database de "grande" (essas de 3mb), ele da erro porque demora muito "Maximum execution time of 300 seconds exceeded"... Sabem o por que deste erro? um exemplo de uma database que eu tentei e não consegui foi esta (mas ja tentei em mais de 10). http://www.tibiaking.com/forum/topic/35778-global-full-10371041-tfs-037/ PS: eu uso uma pequena de 14kb em um ot 10.10 e funciona de boa.
  9. Fala ae galera, blz? To com um problema aqui no meu ot 10.10 e não consigo resolver. Quando algum player ou bixo taca paralyze em alguem, e esse alguem usa alguma magia de cura (exura, exura gran, exura vita e qualquer outra magia de cura) não tira o paralyze, o paralyze só sai com magia de haste (utani hur, utani gran hur, etc), ja troquei o spell.xml e ultimate healing.lua para o de outro servidor que funciona mas nao deu ainda assim. ultimate healing.lua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 7, 9) function onCastSpell(cid, var) return doCombat (cid, combat, var) end spell.xml </instant> <instant name="Ultimate Healing" words="exura vita" lvl="30" mana="160" aggressive="0" selftarget="1" exhaustion="1300" groups="2,1000" icon="3" needlearn="0" event="script" value="healing/ultimate healing.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="5"/> <vocation id="6"/> </instant> Alguem pode me ajudar? :/ O mais estranho é que se eu estiver parado e dar exura por exemplo, ele tira a paralyze, mas se eu estiver andando não...

Informação Importante

Confirmação de Termo