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

Lua [help] [Rune giving Points Premium]

Xordex

New Member
Joined
Dec 23, 2011
Messages
83
Reaction score
1
Hello I have Problem... I wanted to make premium Runes
and did so
Data/Actions/Scripts/NAZWA.lua
Lua:
local cfg = 
{
    points = 100,
    effect = CONST_ME_GIFT_WRAPS
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isPlayer(itemEx.uid)) then
        return false
    end

    db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. cfg.points .. " WHERE `name` = '" .. getAccountByName(getCreatureName(itemEx.uid)) .. "' LIMIT 1;")
    doCreatureSay(cid, "You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
    doSendMagicEffect(toPosition, cfg.effect)
    doRemoveItem(item.uid, 1)
    return true
end

and
Data/Actions.xml
XML:
<action actionid="2282" event="script" value="NAZWA.lua"/>

I Runke Game does not work because You can not use it on the

//Sorry for poor English, but I'm Polish man
 
Last edited by a moderator:
XML:
<action itemid="2282" event="script" value="NAZWA.lua"/>
-> actions.xml entry
 
I don't have any trouble at all with this script.

Did you replace actionid=2282" to itemid="2282"?
 
The script above works fine aswell, since I just tested it myself.
 
Back
Top