• 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!

Windows [TFS 0.4.4 - 8.60] Need help with Blessings talkactions script.

Thaiwor

New Member
Joined
Mar 18, 2015
Messages
19
Reaction score
0
First:
60Hasaq.png


Heres my loggs.

Anyone knows how to fix this?
It didnt happend with tfs 0.3.6, but when i uppgraded i had to change some in config.lua and i guess this is the same but i dont know where to change what.

In hope that anyone could help me.







My second: (and third) is aol doesnt work.
It wont delete itself when i die.
And i still lose items..
Heres my Aol>items.xml
Code:
    </item>
    <item id="2173" article="an" name="amulet of loss">
        <attribute key="weight" value="420" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="1" />
        <attribute key="preventDrop" value="1" />
    </item>



Blessings works(a bit): I wont lose any items with blessings, but i lose levels.

Heres my Blessings.lua in both creaturescripts/talkactions

Code:
 local blessingStorageValue = 12345 -- The storage value you will use to store a players blessings
local blessConfig = {
    [0] = { -- Experience Loss
        lossPercent = 10, -- % of experience a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of experience a player will lose when dying WITH blessings
    },
    [1] = { -- Magic Level Loss
        lossPercent = 10, -- % of magic level a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of magic level a player will lose when dying WITH blessings
    },
    [2] = { -- Skill Loss
        lossPercent = 10, -- % of skills a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of skills a player will lose when dying WITH blessings
    },
    [3] = { -- Container Loss
        lossPercent = 10, -- % chance to lose backpack WITHOUT blessings
        blessPercent = 0 -- % chance to lose backpack WITH blessings
    },
    [4] = { -- Equipment Loss
        lossPercent = 10, -- % chance to lose each individual item equipped on a player WITHOUT blessings
        blessPercent = 0 -- % chance to lose each individual item equipped on a player WITH blessings
    }
}
function onPrepareDeath(cid, deathList)
    for i = 0, 4 do
        doPlayerSetLossPercent(cid, i, ((getCreatureStorage(cid, blessingStorageValue) > 0 and blessConfig.blessPercent*0) or blessConfig.lossPercent*10))
    end
    return true
end








Here's my console
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/actions/scripts/Scroll Magic.lua:20: 'end' expected (to close 'function' at line 7) near '<eof>'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Scroll Magic.lua)
[18/03/2015 20:26:06] data/actions/scripts/Scroll Magic.lua:20: 'end' expected (to close 'function' at line 7) near '<eof>'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/actions/scripts/lol.lua:13: 'end' expected (to close 'function' at line 3) near '<eof>'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/lol.lua)
[18/03/2015 20:26:06] data/actions/scripts/lol.lua:13: 'end' expected (to close 'function' at line 3) near '<eof>'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/equipment.lua)
[18/03/2015 20:26:06] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/equipment.lua)
[18/03/2015 20:26:06] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Event onSay not found (data/talkactions/scripts/blessings.lua)
 
Last edited:
Add 000 to the interval in globalevents.xml.

About the aol, if you don't lose any items you also don't lose your aol.

For the blessing script.
Code:
blessConfig[i].blessPercent*0) or blessConfig[i].lossPercent*10


Edit (didn't see your edit):
Post the scripts that give these errors.
 
Last edited:
Dont need help with the scripts above, its things i dont even use.
Will delete soon.
Aol works now.
But i need help with Blessings.
I dont want people to lose a level ;C
 
First:
60Hasaq.png


Heres my loggs.

Anyone knows how to fix this?
It didnt happend with tfs 0.3.6, but when i uppgraded i had to change some in config.lua and i guess this is the same but i dont know where to change what.

In hope that anyone could help me.







My second: (and third) is aol doesnt work.
It wont delete itself when i die.
And i still lose items..
Heres my Aol>items.xml
Code:
    </item>
    <item id="2173" article="an" name="amulet of loss">
        <attribute key="weight" value="420" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="1" />
        <attribute key="preventDrop" value="1" />
    </item>



Blessings works(a bit): I wont lose any items with blessings, but i lose levels.

Heres my Blessings.lua in both creaturescripts/talkactions

Code:
 local blessingStorageValue = 12345 -- The storage value you will use to store a players blessings
local blessConfig = {
    [0] = { -- Experience Loss
        lossPercent = 10, -- % of experience a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of experience a player will lose when dying WITH blessings
    },
    [1] = { -- Magic Level Loss
        lossPercent = 10, -- % of magic level a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of magic level a player will lose when dying WITH blessings
    },
    [2] = { -- Skill Loss
        lossPercent = 10, -- % of skills a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of skills a player will lose when dying WITH blessings
    },
    [3] = { -- Container Loss
        lossPercent = 10, -- % chance to lose backpack WITHOUT blessings
        blessPercent = 0 -- % chance to lose backpack WITH blessings
    },
    [4] = { -- Equipment Loss
        lossPercent = 10, -- % chance to lose each individual item equipped on a player WITHOUT blessings
        blessPercent = 0 -- % chance to lose each individual item equipped on a player WITH blessings
    }
}
function onPrepareDeath(cid, deathList)
    for i = 0, 4 do
        doPlayerSetLossPercent(cid, i, ((getCreatureStorage(cid, blessingStorageValue) > 0 and blessConfig.blessPercent*0) or blessConfig.lossPercent*10))
    end
    return true
end








Here's my console
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/actions/scripts/Scroll Magic.lua:20: 'end' expected (to close 'function' at line 7) near '<eof>'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Scroll Magic.lua)
[18/03/2015 20:26:06] data/actions/scripts/Scroll Magic.lua:20: 'end' expected (to close 'function' at line 7) near '<eof>'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/actions/scripts/lol.lua:13: 'end' expected (to close 'function' at line 3) near '<eof>'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/lol.lua)
[18/03/2015 20:26:06] data/actions/scripts/lol.lua:13: 'end' expected (to close 'function' at line 3) near '<eof>'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/equipment.lua)
[18/03/2015 20:26:06] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/equipment.lua)
[18/03/2015 20:26:06] data/talkactions/scripts/equipment.lua:30: 'end' expected (to close 'function' at line 2) near 'function'
[18/03/2015 20:26:06] [Warning - Event::loadScript] Event onSay not found (data/talkactions/scripts/blessings.lua)

can u tell me how i make my forgotten server like your forgotten because i don't have the black one i have the old
 
[18/03/2015 20:26:06] [Warning - Event::loadScript] Event onSay not found (data/talkactions/scripts/blessings.lua)



"onSay not found"
 
<talkaction words="!blessings" event="script" value="blessings.lua"/>


is this right?

What can i do to change? Im noob

(new otland account, forgot the last one)
 
<talkaction words="!blessings" event="script" value="blessings.lua"/>


is this right?

What can i do to change? Im noob

(new otland account, forgot the last one)
be sure this function onSay(cid, words, param, channel)
in your first line script
 
Code:
 function onSay(cid, words, param, channel)
end
local blessingStorageValue = 12345
local blessConfig = {
    [0] = { -- Experience Loss
        lossPercent = 10, -- % of experience a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of experience a player will lose when dying WITH blessings
    },
    [1] = { -- Magic Level Loss
        lossPercent = 10, -- % of magic level a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of magic level a player will lose when dying WITH blessings
    },
    [2] = { -- Skill Loss
        lossPercent = 10, -- % of skills a player will lose when dying WITHOUT blessings
        blessPercent = 0 -- % of skills a player will lose when dying WITH blessings
    },
    [3] = { -- Container Loss
        lossPercent = 10, -- % chance to lose backpack WITHOUT blessings
        blessPercent = 0 -- % chance to lose backpack WITH blessings
    },
    [4] = { -- Equipment Loss
        lossPercent = 10, -- % chance to lose each individual item equipped on a player WITHOUT blessings
        blessPercent = 0 -- % chance to lose each individual item equipped on a player WITH blessings
    }
}

function onPrepareDeath(cid, deathList)

    for i = 0, 4 do
        doPlayerSetLossPercent(cid, i, ((getCreatureStorage(cid, blessingStorageValue) > 0 and blessConfig[i].blessPercent*0) or blessConfig[i].lossPercent*10))
    end
    return true
end


Heres my talkactions/blessings.lua


Talkactions.xml
Code:
    <talkaction words="!blessings" event="script" value="blessings.lua"/>
 
Instead of function onPrepareDeath. As the name is already saying, this function has something to do with dieing and can only be used as creaturescript.
 
Eeeh i dont know a single thing about this xd, but how can i do to fix this?
anyone has a good blessings scripts for talkactions?

So i should keep my creaturescript/scripts/blessings.lua?
but not my talkactions blessings?
 
Back
Top