function onSay(cid, words, param)
-- zmienne
local Cost = 20000 -- price
local RuneId = 2293
local charges = 100 -- max 100, for non stackable item it is 1
local effect = 12 -- effect on player after buying
local itemname = manarune
-- koniec zmiennych
local playerpos = getCreaturePosition(cid)
if doPlayerRemoveMoney(cid, Cost) == TRUE then
doPlayerAddItem(cid,RuneId,charges)
doSendMagicEffect(playerpos, effect)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought a " .. itemname .. ".")
else
doPlayerSendCancel(cid, "You don't have enough money, " .. itemname .. " costs " .. price .. " gold coins.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end