• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

problem to recognize mana fluid 7.72

Jpstafe

Well-Known Member
Joined
Aug 8, 2011
Messages
505
Reaction score
67
I have made a script so that you can buy the manafluid by bp with lever .. but I do not take it, it only gives a water vial .. they recommended me to make a separate posion for that, but I have done it and it gives me a lot of errors .. I wanted to know if there is no other way ..
pastur.png
script..

Lua:
        [2280] = {potion = 2006, 9, cost = 1000, backpack_id = 2365, charges = 1}, -- bp mana fluid
} -- config end --

When I put (7) or take the second one, it does not recognize it directly .. as well as it recognizes it .. but only water vial.

potions.lua


Lua:
local ITEM_RUM_FLASK = 2006

local TYPE_EMPTY = 0
local TYPE_WATER = 1
local TYPE_BLOOD = 2
local TYPE_BEER = 3
local TYPE_SLIME = 4
local TYPE_LEMONADE = 5
local TYPE_MILK = 6
local TYPE_MANA_FLUID = 7
local TYPE_LIFE_FLUID = 10
local TYPE_OIL = 11
local TYPE_URINE = 13
local TYPE_COCONUT_MILK = 14
local TYPE_WINE = 15
local TYPE_MUD = 19
local TYPE_FRUIT_JUICE = 21
local TYPE_LAVA = 26
local TYPE_RUM = 27
local TYPE_SWAMP = 28
local TYPE_TEA = 35
 
Solution
E
Lua:
local config = {
        [2248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 2}, -- sudden death rune
        [2254] = {potion = 2313, cost = 6400, backpack_id = 2001, charges = 6}, -- Explosion rune
        [2255] = {potion = 2311, cost = 3600, backpack_id = 2001, charges = 8}, -- HMM rune
        [2249] = {potion = 2305, cost = 4000, backpack_id = 2000, charges = 4}, -- fire bomb rune
        [2258] = {potion = 2304, cost = 3400, backpack_id = 2000, charges = 4}, -- gfb rune
        [2250] = {potion = 2278, cost = 8200, backpack_id = 1998, charges = 2}, -- Paralize rune
        [2257] = {potion = 2260, cost = 300, backpack_id = 2003, charges = 1}, -- Blank runes
        [2251] = {potion = 2273, cost = 3300, backpack_id = 2002, charges =...
tell me how we should help you if we cant see the full script?????

not even said which tfs version
Lua:
local config = {
        [2248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 2}, -- sudden death rune
        [2254] = {potion = 2313, cost = 6400, backpack_id = 2001, charges = 6}, -- Explosion rune
        [2255] = {potion = 2311, cost = 3600, backpack_id = 2001, charges = 8}, -- HMM rune
        [2249] = {potion = 2305, cost = 4000, backpack_id = 2000, charges = 4}, -- fire bomb rune
        [2258] = {potion = 2304, cost = 3400, backpack_id = 2000, charges = 4}, -- gfb rune
        [2250] = {potion = 2278, cost = 8200, backpack_id = 1998, charges = 2}, -- Paralize rune
        [2257] = {potion = 2260, cost = 300, backpack_id = 2003, charges = 1}, -- Blank runes
        [2251] = {potion = 2273, cost = 3300, backpack_id = 2002, charges = 2}, -- ultimate healing rune
        [2252] = {potion = 2261, cost = 3300, backpack_id = 2003, charges = 4}, -- destroy field rune
        [2253] = {potion = 2293, cost = 7000, backpack_id = 2004, charges = 6}, -- magic wall rune
        [2280] = {potion = 2006, 9, cost = 1000, backpack_id = 2365, charges = 1}, -- bp mana fluid
} -- config end --

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local potion = config[item.uid]
        if isInArray({1945, 1946}, item.itemid) ~= TRUE then
                return TRUE
        end
        if doPlayerBuyItemContainer(cid, potion.backpack_id, potion.potion, 1, potion.cost, potion.charges) == TRUE then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought a backpack "..getItemNameById(potion.potion).." for "..potion.cost.." gold coins.")
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..potion.cost.." gold coins for a backpack "..getItemNameById(potion.potion)..".")
        end
        return TRUE
end


version otx tfs 0.x
 
Lua:
local config = {
        [2248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 2}, -- sudden death rune
        [2254] = {potion = 2313, cost = 6400, backpack_id = 2001, charges = 6}, -- Explosion rune
        [2255] = {potion = 2311, cost = 3600, backpack_id = 2001, charges = 8}, -- HMM rune
        [2249] = {potion = 2305, cost = 4000, backpack_id = 2000, charges = 4}, -- fire bomb rune
        [2258] = {potion = 2304, cost = 3400, backpack_id = 2000, charges = 4}, -- gfb rune
        [2250] = {potion = 2278, cost = 8200, backpack_id = 1998, charges = 2}, -- Paralize rune
        [2257] = {potion = 2260, cost = 300, backpack_id = 2003, charges = 1}, -- Blank runes
        [2251] = {potion = 2273, cost = 3300, backpack_id = 2002, charges = 2}, -- ultimate healing rune
        [2252] = {potion = 2261, cost = 3300, backpack_id = 2003, charges = 4}, -- destroy field rune
        [2253] = {potion = 2293, cost = 7000, backpack_id = 2004, charges = 6}, -- magic wall rune
        [2280] = {potion = 2006, cost = 1000, backpack_id = 2365, charges = 7}, -- bp mana fluid
} -- config end --

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local potion = config[item.uid]
        if isInArray({1945, 1946}, item.itemid) ~= TRUE then
                return TRUE
        end
        if doPlayerBuyItemContainer(cid, potion.backpack_id, potion.potion, 1, potion.cost, potion.charges) == TRUE then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought a backpack "..getItemNameById(potion.potion).." for "..potion.cost.." gold coins.")
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..potion.cost.." gold coins for a backpack "..getItemNameById(potion.potion)..".")
        end
        return TRUE
end

subtype 7 = mana fluid, just put the subtype you want in the "charges" setting like I did above
 
Solution
Lua:
local config = {
        [2248] = {potion = 2268, cost = 6500, backpack_id = 2003, charges = 2}, -- sudden death rune
        [2254] = {potion = 2313, cost = 6400, backpack_id = 2001, charges = 6}, -- Explosion rune
        [2255] = {potion = 2311, cost = 3600, backpack_id = 2001, charges = 8}, -- HMM rune
        [2249] = {potion = 2305, cost = 4000, backpack_id = 2000, charges = 4}, -- fire bomb rune
        [2258] = {potion = 2304, cost = 3400, backpack_id = 2000, charges = 4}, -- gfb rune
        [2250] = {potion = 2278, cost = 8200, backpack_id = 1998, charges = 2}, -- Paralize rune
        [2257] = {potion = 2260, cost = 300, backpack_id = 2003, charges = 1}, -- Blank runes
        [2251] = {potion = 2273, cost = 3300, backpack_id = 2002, charges = 2}, -- ultimate healing rune
        [2252] = {potion = 2261, cost = 3300, backpack_id = 2003, charges = 4}, -- destroy field rune
        [2253] = {potion = 2293, cost = 7000, backpack_id = 2004, charges = 6}, -- magic wall rune
        [2280] = {potion = 2006, cost = 1000, backpack_id = 2365, charges = 7}, -- bp mana fluid
} -- config end --

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local potion = config[item.uid]
        if isInArray({1945, 1946}, item.itemid) ~= TRUE then
                return TRUE
        end
        if doPlayerBuyItemContainer(cid, potion.backpack_id, potion.potion, 1, potion.cost, potion.charges) == TRUE then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought a backpack "..getItemNameById(potion.potion).." for "..potion.cost.." gold coins.")
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need "..potion.cost.." gold coins for a backpack "..getItemNameById(potion.potion)..".")
        end
        return TRUE
end

subtype 7 = mana fluid, just put the subtype you want in the "charges" setting like I did above
thanks, it worked perfectly
 
Back
Top