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

In talkactions.xml
Code:
<talkaction words="!aol" script="aol.lua"/>
      <talkaction words="!bless" event="script" value="blessing.lua"/>

In talkactions/scripts
Add aol.lua and blessing.lua

Post this in aol
Code:
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

And this in blessing
Code:
function onSay(cid, words, param)

if getPlayerBlessing(cid,5) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
end
end
return TRUE
end

Update:
In talkactions.xml
Code:
<talkaction words="!backpack" event="script" value="backpack.lua"/>

create backpack.lua in talkactions/scripts and add
Code:
function onSay(cid, words, param)
local cost = 100
local item = 1988
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
The backpack will cost 100 gold, aol 10k and Blessings 50k
 
The New Bless that have Bless and Aol in one Word !bless :)

In talkactions.xml

Lua:
	<talkaction words="!bless" event="script" value="bless.lua"/>

In talkactions/scripts
Add bless.lua The Add this in it:
Lua:
  local bless = {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
    for i = 1, table.maxn(bless) do
        if(getPlayerBlessing(cid, bless[i])) then
            doPlayerSendCancel(cid, "You have already all blessings.")
            return TRUE
        end
    end
   
    if(doPlayerRemoveMoney(cid, cost) == TRUE) then
        for i = 1, table.maxn(bless) do
            doPlayerAddBlessing(cid, bless[i])
        end
        doCreatureSay(cid, "You are now blessed by the GOD Apsivaflines!" ,19)
        doSendMagicEffect(getPlayerPosition(cid), 49)
    else
        doPlayerSendCancel(cid, "You don\'t have enough money.")
    end
    return TRUE
end

Hope i helped u :)
 
The New Bless that have Bless and Aol in one Word !bless :)

In talkactions.xml

Lua:
	<talkaction words="!bless" event="script" value="bless.lua"/>

In talkactions/scripts
Add bless.lua The Add this in it:
Lua:
  local bless = {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
    for i = 1, table.maxn(bless) do
        if(getPlayerBlessing(cid, bless[i])) then
            doPlayerSendCancel(cid, "You have already all blessings.")
            return TRUE
        end
    end
   
    if(doPlayerRemoveMoney(cid, cost) == TRUE) then
        for i = 1, table.maxn(bless) do
            doPlayerAddBlessing(cid, bless[i])
        end
        doCreatureSay(cid, "You are now blessed by the GOD Apsivaflines!" ,19)
        doSendMagicEffect(getPlayerPosition(cid), 49)
    else
        doPlayerSendCancel(cid, "You don\'t have enough money.")
    end
    return TRUE
end

Hope i helped u :)
Kuyt, my script has the aol and bless in the same ...
 
Back
Top