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

Solved bless book

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,305
Reaction score
129
Well i found on forums much bless boooks but this was most nice and + i lil edited it and i recieve error
What im doing wrong

error.
HTML:
[10:0:46.383] [Error - LuaInterface::loadFile] data/actions/scripts/blessbook1charge.lua:12: 'end' expected (to close 'for' at line 6) near 'else'
[10:0:46.383] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/blessbook1charge.lua)
[10:0:46.383] data/actions/scripts/blessbook1charge.lua:12: 'end' expected (to close 'for' at line 6) near 'else'

was trying to fix it for long but always fail to make fully working ^^


blessbook.lua
PHP:
local cfg = {
    bless = { 1, 2, 3, 4, 5 },
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
     for i = 1, table.maxn(cfg.bless) do
        if(getPlayerBlessing(cid, cfg.bless[i])) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        doPlayerSendCancel(cid, "You have already recieved Blessings!")
        return true
        end
    else
            doCreatureSetDropLoot(cid, false)
            doRemoveItem(cid, item.uid, 1)
            doPlayerAddBlessing(cid, cfg.bless[i])
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
            doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
            doPlayerSendTextMessage(cid, 21, "You have recieved blessings by Ancient Book!")
   
    end
return true
end
 
@Xikini and everyone else who is making an attempt to help these knuckle heads with their servers... don't go overboard and stress yourself out for these fools.. it isn't worth it, just provide your solution and move on, people need to realize they need to develop these skillsets as well or appreciate the help they receive while at the same time making some effort on their part.

You know why people don't like me now?
Its not because I am argumentative with just about everyone (sorry i like to form my own opinion), its because I won't be your slave, you all want me and people like myself to just shut up and keep providing content or done to death concepts for your "unique" projects..

Sorry I didn't grow up in a fascists country or nanny state, a lot of you like to argue how america is a country of dumb down idiots... where the education system sucks.. while that might be true, it wasn't always that way...

Or maybe you are just jealous because now you have competition.
I'd just like to point out while you do have a point maybe people would like you MORE if you didn't include cursing and name-calling in every 1/3rd of a post you make? Like, I understand your point but theres no need to put these name-callings in here :) I didnt reply because I somehow feel offended by this, because Im not feeling offended by this at all but I feel like its by time someone calls you out on this. People simply dont like you because of your high horse attitude and your name callings. Very simple actually
 
Last edited:
I'd just like to point out while you do have a point maybe people would like you MORE if you didn't include cursing and name-calling in every 1/3rd of a post you make? Like, I understand your point but theres no need to put these name-callings in here :) I didnt reply because I somehow feel offended by this, because Im not feeling offended by this at all but I feel like its by time someone calls you out on this. People simply dont like you because of your high horse attitude and your name callings. Very simple actually
Thank you :)
 
Back
Top