• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

I HAVE 2 PROBLEMS WITH MY SERVER

Olddies

Classicot.com
Joined
Nov 21, 2009
Messages
1,285
Solutions
12
Reaction score
417
Location
Dominican Republic 🇩🇴
WELL AS I SAID I HAVE 2 PROBLEM WITH MY SERVER THE FIRST ONE IS MANA FLUIDS THE PLAYERS CANT USE IT IN THE CONSOLE APPEARS ONE ERROR WHEN I'M SETTING UP THE SERVER
[03/01/2014 21:53:41] [Warning - NpcScript::NpcScript] Can not load script: runes.lua
[03/01/2014 21:53:41] cannot open runes.lua: No such file or directory

THE SECOND PROBLEM IS PROMOTION WHEN I ASK FOR PROMOTION TO THE KING IT SAYS I NEED MY PREMIUM ACCOUNT IN ORDER AND I HAVE 16566 DAYS OF PREMIUM.... Sry for my bad english :)
 
Last edited:
First of all, your NOT working manafluids have nothing to do with the runes. lua script.

Check in your data/actions/actions.xml file, edit it with Notepad and try to find these lines:
-- Fluids
<action itemid="1775" script="fluids.lua" />
<action itemid="2562" script="fluids.lua" />
<action itemid="2006" script="fluids.lua" />
<action itemid="2034" script="fluids.lua" />
<action itemid="2574" script="fluids.lua" />
<action itemid="2575" script="fluids.lua" />

<action itemid="2576" script="fluids.lua" />
<action itemid="2577" script="fluids.lua" />
<action itemid="2005" script="fluids.lua" />

If they do not exist, add them. Also create your fluids.lua file in data/actions/scripts directory:
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)

function onUse(cid, item, frompos, item2, topos)
    if((hasCondition(cid, CONDITION_EXHAUST_COMBAT) == TRUE) or (hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE)) then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
        return TRUE
    end

    if item2.itemid == 1 then
        if item.type == 0 then
            doPlayerSendCancel(cid, "It is empty.")
        else
            if item2.uid == cid then
                doChangeTypeItem(item.uid, 0)
                if item.type == 7 then
                    new_mana = math.random(80, 160)
                    doPlayerAddMana(cid, new_mana)
                    doSendMagicEffect(topos, 12)
                    doPlayerSay(cid, "Aaaah...", 1)
                    doAddCondition(cid, exhaust)
                    doRemoveItem(item.uid, 1)
                elseif item.type == 10 then
                    new_life = math.random(40, 80)
                    doPlayerAddHealth(cid, new_life)
                    doSendMagicEffect(topos, 12)
                    doPlayerSay(cid, "Aaaah...", 1)
                else
                    doPlayerSay(cid, "Gulp.", 1)
                end
            else
                doChangeTypeItem(item.uid, 0)
                splash = doCreateItem(2025, item.type, topos)
                doDecayItem(splash)
            end
        end
    elseif item2.itemid >= 490 and item2.itemid <= 517
    or item2.itemid >= 618 and item2.itemid <= 629
    or item2.itemid == 1368 or item2.itemid == 1369
    or item2.itemid >= 4820 and item2.itemid <= 4825
    or item2.itemid >= 4828 and item2.itemid <= 4831
    or item2.itemid >= 4608 and item2.itemid <= 4666 then
        doChangeTypeItem(item.uid, 1)
    elseif item2.itemid == 103 then
        doChangeTypeItem(item.uid, 19)
    elseif item2.itemid >= 598 and item2.itemid < 601
    or item2.itemid == 1509
    or item2.itemid >= 518 and item2.itemid <= 529 then
        doChangeTypeItem(item.uid, 26)
    elseif item2.itemid >= 351 and item2.itemid <= 355 then
        doChangeTypeItem(item.uid, 19)
    elseif item2.itemid >= 602 and item2.itemid <= 605
    or item2.itemid >= 4691 and item2.itemid <= 4755
    or item2.itemid == 4758 then
        doChangeTypeItem(item.uid, 28)
    elseif item2.itemid == 1771 then
        doChangeTypeItem(item.uid, 1)
    elseif item2.itemid == 1772 then
        doChangeTypeItem(item.uid, 3)
    elseif item2.itemid == 1773 then
        doChangeTypeItem(item.uid, 15)
    elseif item2.itemid > 2806 and item2.itemid < 3132
    or item2.itemid >= 4251 and item2.itemid <= 4327 then
        doChangeTypeItem(item.uid, 2)
    else
        if item.type == 0 then
            doPlayerSendCancel(cid, "It is empty.")
        else
            doChangeTypeItem(item.uid, 0)
            splash = doCreateItem(2025, item.type, topos)
            doDecayItem(splash)
        end
    end
   
    return TRUE
end

Also to fix the error you mentioned with runes.lua, create in data/npc/scripts
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



-- OTServ event handling functions start
function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)    npcHandler:onCreatureSay(cid, type, msg) end
function onThink()                            npcHandler:onThink() end
-- OTServ event handling functions end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'wand of inferno', 'inferno'},        2187, 5000,        'wand of inferno')
shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic'},        2189, 3000,        'wand of cosmic energy')
shopModule:addBuyableItem({'wand of plague', 'plague'},        2188, 2000,        'wand of plague')
shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'},        2191, 500,        'wand of dragonbreath')
shopModule:addBuyableItem({'wand of vortex', 'vortex'},        2190, 10,        'wand of vortex')

shopModule:addBuyableItem({'tempest rod', 'tempest'},        2183, 5000,        'tempest rod')
shopModule:addBuyableItem({'quagmire rod', 'quagmire'},        2189, 3000,        'quagmire rod')
shopModule:addBuyableItem({'volcanic rod', 'volcanic'},        2185, 2000,        'volcanic rod')
shopModule:addBuyableItem({'moonlight rod', 'moonlight'},        2186, 100,        'moonlight rod')
shopModule:addBuyableItem({'snakebite rod', 'snakebite'},        2182, 10,        'snakebite rod')


shopModule:addBuyableItem({'light wand', 'lightwand'},        2163, 500,        'magic light wand')
shopModule:addBuyableItem({'heavy magic missile', 'hmm'},    2311, 100,    10,    'heavy magic missile rune')
shopModule:addBuyableItem({'fire bomb', 'f b'},    2305, 100,    3,    'fire bomb rune')
shopModule:addBuyableItem({'destroy field', 'df'},    2261, 50,    3,    'destroy field rune')
shopModule:addBuyableItem({'great fireball', 'gfb'},            2304, 150,    6,    'great fireball rune')
shopModule:addBuyableItem({'explo', 'xpl'},                    2313, 200,    9,    'explosion rune')
shopModule:addBuyableItem({'ultimate healing', 'uh'},        2274, 150,    4,    'ultimate healing rune')
shopModule:addBuyableItem({'sudden death', 'sd'},            2263, 300,    3,    'sudden death rune')
shopModule:addBuyableItem({'mana fluid', 'manafluid'},        2006, 50,    7,    'mana fluid')
shopModule:addBuyableItem({'blank', 'rune'},                    2260, 10,        'blank rune')


npcHandler:addModule(FocusModule:new())
 
Back
Top