local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.
local maxlevel = 1000
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 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,19,"You have successfully all blessing , now do not need aol.")
end
else
doPlayerSendTextMessage(cid,19,"You need to have "..new_cost.."gp 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
doPlayerSendTextMessage(cid,19,"You have successfully been blessed.")
else
doPlayerSendTextMessage(cid,19,"You need to have "..cost.."gp to buy blessings.")
end
end
return FALSE
end
<talkaction words="!bless" event="script" value="bless.lua" />
No, if i wanted a new server i would get one.Use a newer server.
Post your script
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.
local maxlevel = 1000
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 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,19,"You have successfully all blessing , now do not need aol.")
end
else
doPlayerSendTextMessage(cid,19,"You need to have "..new_cost.."gp 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
doPlayerSendTextMessage(cid,19,"You have successfully been blessed.")
else
doPlayerSendTextMessage(cid,19,"You need to have "..cost.."gp to buy blessings.")
end
end
return FALSE
end
<talkaction words="!bless" script="bless.lua" />
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid,1000000) == 1 then -- change price to what ever you want
StdModule.bless, bless = 1,
StdModule.bless, bless = 2,
StdModule.bless, bless = 3,
StdModule.bless, bless = 4,
StdModule.bless, bless = 5
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You've bought all the blessings!")
else
doPlayerSendCancel(cid,"You don't have enough money.")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
end
PHP:function onSay(cid, words, param) if doPlayerRemoveMoney(cid,1000000) == 1 then -- change price to what ever you want StdModule.bless, bless = 1, StdModule.bless, bless = 2, StdModule.bless, bless = 3, StdModule.bless, bless = 4, StdModule.bless, bless = 5 doSendMagicEffect(getPlayerPosition(cid),12) doPlayerSendTextMessage(cid,22,"You've bought all the blessings!") else doPlayerSendCancel(cid,"You don't have enough money.") doSendMagicEffect(getPlayerPosition(cid),2) end return TRUE end
function onSay(cid, words, param)
local storage = 1337 --Change this to any number not in use
if getPlayerStorageValue(cid, 1337) == 1 then
doPlayerSendCancel(cid, "You already have blessings.")
else
if doPlayerRemoveMoney(cid,100000) == 1 then
setPlayerStorageValue(cid, 1337, 1)
doSendMagicEffect(getPlayerPosition(cid), 12)
doPlayerSendTextMessage(cid, 22, "Blessings acquired.")
else
doPlayerSendCancel(cid,"You don't have enough money.")
doSendMagicEffect(getPlayerPosition(cid),2)
end
end
return TRUE
end
onPrepareDeath(cid, deathList)
if getPlayerStorage(cid, 1337) == 1 then
doTeleportThing(cid, getTownTemplePosition (1))
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
setPlayerStorageValue(cid, 1337, -1)
doPlayerSendTextMessage(cid, 27, "Your blessings have saved you, do not forget to buy new ones!")
end
return true
end