function onSay(cid, words, param)
local cost = 10000
local item = 2173
local quantity = 1
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You have not enough gold.")
end
return TRUE
end
<talkaction words="!aol" script="buy.lua"/>
<talkaction words="!aol" event="script"value="aol.lua" />
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == 1 then
doPlayerAddItem(cid, 2173, 1)
else
doPlayerSendCancel(cid, 'You don\'t have enough money.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
<talkaction words="!bless" event="script" value="bless.lua"/>
function onSay(cid, words, param)
local fail = 0
if getPlayerLevel(cid) < 31 then
cost = 2000
else
cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
end
if cost > 20000 then
cost = 20000
end
for i = 1, 5 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 5 and not(fail == 5) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
end
else
doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings!")
break
end
end
end
if fail == 5 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
return TRUE
end
function onSay (cid, words, param)
if doPlayerRemoveMoney (cid, 10000) == TRUE then
doPlayerAddItem(cid,2173,1)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You've bought an Amulet of Loss!")
else
doPlayerSendCancel(cid,"You don't have enough money.")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return true
end
-- !blessing by artofwork
local bless = {1, 2, 3, 4, 5}
local cost = 1000000
local maxlevel = 1000000000
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = (lvl * cost) / 500
local target = getPlayerGUID(cid)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You have already have been blessed.")
return TRUE
end
end
if (getPlayerLevel(cid) >= maxlevel) then
if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerSendTextMessage(cid,22,"You have been successfully blessed.!")
end
else
doPlayerPopupFYI(cid, "You need "..new_cost.." to buy blessings.")
end
elseif(getPlayerLevel(cid) < maxlevel) then
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerPopupFYI(cid, "You have successfully been blessed.")
else
doPlayerPopupFYI(cid, "You need to have "..cost.."gp to buy blessings.")
end
end
return FALSE
end
Aol didnt workt, it just takes 10 k and i not get my aol
Aol didnt workt, it just takes 10 k and i not get my aol
Why does the aol not work? :S
function onSay(cid, words, param)
local cost = 10000
local item = 2173
local quantity = 1
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You have not enough gold.")
end
return TRUE
end
local t = {
itemid = 2173,
count = 1,
cost = 10000
}
function onSay(cid, words, param, channel)
if doPlayerRemoveMoney(cid, t.cost) then
doPlayerAddItem(cid, t.itemid, t.cost)
doCreatureSay(cid, "You have bought " .. t.count .. "x " .. getItemNameById(t.itemid) .. " for " .. t.cost .. " gold", TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
else
doPlayerSendCancel(cid, "You need " .. t.cost .. " gold.")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
return true
end
<talkaction words="!aol" [B][COLOR="Red"]event="script" value[/COLOR][/B]="aol.lua"/>