White Rabbit
sereniaot.org
Can someone make talkactions? !bless, !aol, !backpack. Im using tfs 0.3.5
<talkaction words="!aol" script="aol.lua"/>
<talkaction words="!bless" event="script" value="blessing.lua"/>
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
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
<talkaction words="!backpack" event="script" value="backpack.lua"/>
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
<talkaction words="!bless" event="script" value="bless.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
Kuyt, my script has the aol and bless in the same ...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