Postado Agosto 9, 2017 7 anos Tem mais 15 errors mais não queria abarrotar esse topico [23:1:42.572] [Error - Action Interface] [23:1:42.573] data/actions/scripts/other/fluids.lua [23:1:42.574] Description: [23:1:42.574] (luaAddDamageCondition) Condition not found [23:1:42.575] [Error - Action Interface] [23:1:42.576] data/actions/scripts/other/potions.lua [23:1:42.577] Description: [23:1:42.577] data/actions/scripts/other/potions.lua:1: attempt to call global 'Condition' (a nil value) [23:1:42.578] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/potions.lua) [23:1:42.168] [Error - Action Interface] [23:1:42.168] data/actions/scripts/food_special.lua [23:1:42.169] Description: [23:1:42.170] (luaSetConditionParam) Condition not found Spoiler fluids.lua Spoiler -- TODO: Rewrite this script using fluidtypes from LIQUIDS doc-file, -- and correct itemid's to recieve the liquids. local drunk = createConditionObject(CONDITION_DRUNK) setConditionParam(drunk, CONDITION_PARAM_TICKS, 60000) local poison = createConditionObject(CONDITION_POISON) addDamageCondition(poison, 2, 6000, -5) addDamageCondition(poison, 3, 6000, -4) addDamageCondition(poison, 5, 6000, -3) addDamageCondition(poison, 10, 6000, -2) addDamageCondition(poison, 20, 6000, -1) local fluidType = {3, 4, 5, 7, 10, 11, 13, 15, 19} local fluidMessage = {"Aah...", "Urgh!", "Mmmh.", "Aaaah...", "Aaaah...", "Urgh!", "Urgh!", "Aah...", "Urgh!"} function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.uid == 39002 then return false else if(isItemFluidContainer(itemEx.itemid) and itemEx.type == 0) then doChangeTypeItem(itemEx.uid, item.type) doChangeTypeItem(item.uid, 0) return true end if(isItemFluidContainer(itemEx.itemid) and item.type == 0) then doChangeTypeItem(itemEx.uid, 0) doChangeTypeItem(item.uid, itemEx.type) return true end if itemEx.itemid == 1 then if item.type == 0 then doPlayerSendCancel(cid, "It is empty.") elseif itemEx.uid == cid then doChangeTypeItem(item.uid, 0) if item.type == 3 or item.type == 15 then doTargetCombatCondition(0, cid, drunk, CONST_ME_NONE) elseif item.type == 4 then doTargetCombatCondition(0, cid, poison, CONST_ME_NONE) elseif item.type == 7 then doPlayerAddMana(cid, math.random(50, 150)) doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE) elseif item.type == 10 then doCreatureAddHealth(cid, 60) doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE) end for i = 0, #fluidType do if item.type == fluidType then doCreatureSay(cid, fluidMessage, TALKTYPE_ORANGE_1) return true end end doCreatureSay(cid, "Gulp.", TALKTYPE_ORANGE_1) else local splash = doCreateItem(2016, item.type, toPosition) doChangeTypeItem(item.uid, 0) doDecayItem(splash) end else local fluidSource = getFluidSourceType(itemEx.itemid) if fluidSource ~= 0 then doChangeTypeItem(item.uid, fluidSource) elseif item.type == 0 then doPlayerSendCancel(cid, "It is empty.") else if toPosition.x == CONTAINER_POSITION then toPosition = getCreaturePosition(cid) end splash = doCreateItem(2016, item.type, toPosition) doChangeTypeItem(item.uid, 0) doDecayItem(splash) end end return trueendend potions.lua Spoiler local berserk = Condition(CONDITION_ATTRIBUTES)berserk:setParameter(CONDITION_PARAM_SUBID, 7)berserk:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)berserk:setParameter(CONDITION_PARAM_SKILL_MELEE, 5)berserk:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)berserk:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local mastermind = Condition(CONDITION_ATTRIBUTES)mastermind:setParameter(CONDITION_PARAM_SUBID, 8)mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3)mastermind:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local bullseye = Condition(CONDITION_ATTRIBUTES)bullseye:setParameter(CONDITION_PARAM_SUBID, 9)bullseye:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5)bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)bullseye:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local antidote = Combat()antidote:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)antidote:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)antidote:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON)antidote:setParameter(COMBAT_PARAM_AGGRESSIVE, false)antidote:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true) local potions = { [6558] = {transform = {id = {7588, 7589}}, effect = CONST_ME_DRAWBLOOD}, [7439] = {condition = berserk, vocations = {4, 8}, effect = CONST_ME_MAGIC_RED, description = "Only knights may drink this potion.", text = "You feel stronger."}, [7440] = {condition = mastermind, vocations = {1, 2, 5, 6}, effect = CONST_ME_MAGIC_BLUE, description = "Only sorcerers and druids may drink this potion.", text = "You feel smarter."}, [7443] = {condition = bullseye, vocations = {3, 7}, effect = CONST_ME_MAGIC_GREEN, description = "Only paladins may drink this potion.", text = "You feel more accurate."}, [7588] = {health = {250, 350}, vocations = {3, 4, 7, 8}, level = 50, flask = 7634, description = "Only knights and paladins of level 50 or above may drink this fluid."}, [7589] = {mana = {115, 185}, vocations = {1, 2, 3, 5, 6, 7}, level = 50, flask = 7634, description = "Only sorcerers, druids and paladins of level 50 or above may drink this fluid."}, [7590] = {mana = {150, 250}, vocations = {1, 2, 5, 6}, level = 80, flask = 7635, description = "Only druids and sorcerers of level 80 or above may drink this fluid."}, [7591] = {health = {425, 575}, vocations = {4, 8}, level = 80, flask = 7635, description = "Only knights of level 80 or above may drink this fluid."}, [7618] = {health = {125, 175}, flask = 7636}, [7620] = {mana = {75, 125}, flask = 7636}, [8472] = {health = {250, 350}, mana = {100, 200}, vocations = {3, 7}, level = 80, flask = 7635, description = "Only paladins of level 80 or above may drink this fluid."}, [8473] = {health = {650, 850}, vocations = {4, 8}, level = 130, flask = 7635, description = "Only knights of level 130 or above may drink this fluid."}, [8474] = {combat = antidote, flask = 7636}, [8704] = {health = {60, 90}, flask = 7636}, [26029] = {mana = {425, 575}, vocations = {1, 2, 5, 6}, level = 130, flask = 7635, description = "Only druids and sorcerers of level 130 or above may drink this fluid."}, [26030] = {health = {420, 580}, mana = {250, 350}, vocations = {3, 7}, level = 130, flask = 7635, description = "Only paladins of level 130 or above may drink this fluid."}, [26031] = {health = {875, 1125}, vocations = {4, 8}, level = 200, flask = 7635, description = "Only knights of level 200 or above may drink this fluid."}} function onUse(player, item, fromPosition, target, toPosition, isHotkey) if type(target) == "userdata" and not target:isPlayer() then return false end local potion = potions[item:getId()] if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getId()) then player:say(potion.description, TALKTYPE_MONSTER_SAY) return true end if potion.health or potion.mana or potion.combat then if potion.health then doTargetCombatHealth(0, target, COMBAT_HEALING, potion.health[1], potion.health[2], CONST_ME_MAGIC_BLUE) end if potion.mana then doTargetCombatMana(0, target, potion.mana[1], potion.mana[2], CONST_ME_MAGIC_BLUE) end if potion.combat then potion.combat:execute(target, Variant(target:getId())) end target:say("Aaaah...", TALKTYPE_MONSTER_SAY) player:addItem(potion.flask, 1) end if potion.condition then player:addCondition(potion.condition) player:say(potion.text, TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(potion.effect) end if potion.transform then item:transform(potion.transform.id[math.random(#potion.transform.id)]) item:getPosition():sendMagicEffect(potion.effect) return true end item:remove(1) return trueend food_special Spoiler local conditions = { CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY, CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN, CONDITION_FREEZING, CONDITION_DAZZLED, CONDITION_CURSED, CONDITION_BLEEDING} local condition_shield = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition_shield, CONDITION_PARAM_SUBID, 3)setConditionParam(condition_shield, CONDITION_PARAM_BUFF_SPELL, 1)setConditionParam(condition_shield, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_shield, CONDITION_PARAM_SKILL_SHIELD, 10)setConditionParam(condition_shield, CONDITION_PARAM_FORCEUPDATE, true) local condition_ml = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition_ml, CONDITION_PARAM_SUBID, 4)setConditionParam(condition_ml, CONDITION_PARAM_BUFF_SPELL, 1)setConditionParam(condition_ml, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_ml, CONDITION_PARAM_STAT_MAGICPOINTS, 5)setConditionParam(condition_ml, CONDITION_PARAM_FORCEUPDATE, true) local condition_melee = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition_melee, CONDITION_PARAM_SUBID, 5)setConditionParam(condition_melee, CONDITION_PARAM_BUFF_SPELL, 1)setConditionParam(condition_melee, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_melee, CONDITION_PARAM_SKILL_MELEE, 10)setConditionParam(condition_melee, CONDITION_PARAM_FORCEUPDATE, true) local condition_dist = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition_dist, CONDITION_PARAM_SUBID, 6)setConditionParam(condition_dist, CONDITION_PARAM_BUFF_SPELL, 1)setConditionParam(condition_dist, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_dist, CONDITION_PARAM_SKILL_DISTANCE, 10)setConditionParam(condition_dist, CONDITION_PARAM_FORCEUPDATE, true) local condition_f = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition_f, CONDITION_PARAM_SUBID, 7)setConditionParam(condition_f, CONDITION_PARAM_BUFF_SPELL, 1)setConditionParam(condition_f, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_f, CONDITION_PARAM_SKILL_FISHING, 50)setConditionParam(condition_f, CONDITION_PARAM_FORCEUPDATE, true) local condition_speed = createConditionObject(CONDITION_HASTE)setConditionParam(condition_speed, CONDITION_PARAM_TICKS, 60 * 60 * 1000)setConditionParam(condition_speed, CONDITION_PARAM_SPEED, 600) local combat_i = createCombatObject()setCombatParam(combat_i, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)setCombatParam(combat_i, COMBAT_PARAM_AGGRESSIVE, 0) local condition_i = createConditionObject(CONDITION_INVISIBLE)setConditionParam(condition_i, CONDITION_PARAM_TICKS, 600000)setCombatCondition(combat_i, condition_i) function onUse(cid, item, frompos, item2, topos)local iid = {[9992] = 0, [9993] = 1, [9994] = 2, [9995] = 3, [9996] = 4, [9997] = 5, [9998] = 6, [9999] = 7, [10000] = 8, [10001] = 9, [12540] = 10, [12542] = 11, [12543] = 12, [12544] = 13} if getPlayerStorageValue(cid,17110 + iid[item.itemid]) > os.time() then doPlayerSendCancel(cid, "You are full.") return true end setPlayerStorageValue(cid,17110 + iid[item.itemid],os.time() + (15 * 60) ) if item.itemid == 9992 then doRemoveItem(item.uid, 1) Creature(cid):addHealth(getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureSay(cid, "Gulp.", 34) doPlayerSendTextMessage(cid, 18, "Your health has been refilled.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9993 then doRemoveItem(item.uid, 1) for i = 1, #conditions do doRemoveCondition(cid, conditions) end doCreatureSay(cid, "Chomp.", 34) doPlayerSendTextMessage(cid, 18, "You feel better body condition.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9994 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_shield) doCreatureSay(cid, "Chomp.", 34) doPlayerSendTextMessage(cid, 18, "You feel less vulnerable.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9995 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_ml) doCreatureSay(cid, "Chomp.", 34) doPlayerSendTextMessage(cid, 18, "You feel smarter.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9996 then doRemoveItem(item.uid, 1) doCreatureSay(cid, "Slurp.", 34) doPlayerSendTextMessage(cid, 18, "You don't really know what this did to you, but suddenly you feel very happy.") doSendMagicEffect(getThingPos(cid), CONST_ME_HEARTS) return true elseif item.itemid == 9997 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_melee) doCreatureSay(cid, "Yum.", 34) doPlayerSendTextMessage(cid, 18, "You feel stronger.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9998 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_speed) doCreatureSay(cid, "Munch.", 34) doPlayerSendTextMessage(cid, 18, "Your speed has been increased.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 9999 then doRemoveItem(item.uid, 1) Creature(cid):addMana(Creature(cid):getMaxMana() - Creature(cid):getMana()) doCreatureSay(cid, "Chomp.", 34) doPlayerSendTextMessage(cid, 18, "Your mana has been refilled.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 10000 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_dist) doCreatureSay(cid, "Mmmm.", 34) doPlayerSendTextMessage(cid, 18, "You feel more focused.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 10001 then doRemoveItem(item.uid, 1) doAddCondition(cid, condition_f) doCreatureSay(cid, "Smack.", 34) doPlayerSendTextMessage(cid, 18, "You felt fishing inspiration.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 12540 then doRemoveItem(item.uid, 1) setPlayerStorageValue(cid,17100,os.time() + 86400 ) doCreatureSay(cid, "Yum.", 34) doPlayerSendTextMessage(cid, 18, "Underwater walking speed increased.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 12542 then if math.random(1,5) == 5 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 18, "You take the last gulp from the large bowl. No leftovers!") else doPlayerSendTextMessage(cid, 18, "You take a gulp from the large bowl, but there's still some blackjack in it.") end Creature(cid):addHealth(getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureSay(cid, "Gulp.", 34) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 12543 then doRemoveItem(item.uid, 1) local c = {condition_shield,condition_ml,condition_melee,condition_dist,condition_speed} local r = math.random(1,4) if r == 1 then doAddCondition(cid, c[math.random(1, #c)]) doPlayerSendTextMessage(cid, 18, "You feel stronger, but you have no idea what was increased.") elseif r == 2 then doSetCreatureLight(cid, 15, 154, 60*60*1000) doPlayerSendTextMessage(cid, 18, "You feel enlightened.") elseif r == 3 then doAddCondition(cid, condition_i) doPlayerSendTextMessage(cid, 18, "You became invisible.") elseif r == 4 then Creature(cid):addHealth(getCreatureMaxHealth(cid) - getCreatureHealth(cid)) Creature(cid):addMana(Creature(cid):getMaxMana() - Creature(cid):getMana()) doPlayerSendTextMessage(cid, 18, "Your vitality has been restored.") end doCreatureSay(cid, "Smack.", 34) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true elseif item.itemid == 12544 then local ring = getPlayerSlotItem(cid, CONST_SLOT_RING) local r_t = { [2211] = 2208, [2212] = 2209, [6301] = 6300, [2215] = 2213, [2204] = 2167, [2205] = 2168, [2164] = 2164, [2203] = 2166, [18528] = 18408, [2216] = 2214, [13826] = 13825, [2202] = 2165, [2210] = 2207, [2206] = 2169} if(ring.itemid == 0) then doPlayerSendTextMessage(cid, 18, "No ring equipped.") doSendMagicEffect(fromPosition, CONST_ME_POFF) return true end if r_t[ring.itemid] ~= nil then doRemoveItem(item.uid, 1) if ring.itemid == r_t[ring.itemid] then r_m_am = 20 else r_m_am = 1 end for i = 1, 10 do doPlayerAddItem(cid, r_t[ring.itemid], r_m_am) end doPlayerSendTextMessage(cid, 18, "Your ring has been multiplied.") doCreatureSay(cid, "Slurp!", 34) return true else doPlayerSendTextMessage(cid, 18, "This ring cannot be multiplied.") doSendMagicEffect(fromPosition, CONST_ME_POFF) return true end endend Editado Agosto 9, 2017 7 anos por Liktheg6 (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.