Wazzap
Killing Elite
I have for you rune which is adding points up to shopu for player if we will apply it to ourselves.
Data/Actions/Scripts/pkt.lua
Data/Actions.xml
XXX = ID item or rune what will add premium point
Data/Actions/Scripts/pkt.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
LUA:
<action actionid="XXX" event="script" value="pkt.lua"/>
XXX = ID item or rune what will add premium point