FLE
Member
Hey Otland,
I decided too post these... just too promote use of tfs 1.1!
talkactions.xml
bless.lua
aol.lua
Enjoy ~
I decided too post these... just too promote use of tfs 1.1!
talkactions.xml
Code:
<talkactionwords="!bless"script="bless.lua"/>
<talkactionwords="!aol"script="aol.lua"/>
bless.lua
Code:
local bless ={1,2,3,4,5}
local price =100000
function onSay(player, words, param)
for i =1, table.maxn(bless)doif player:hasBlessing(bless[i])then
player:sendCancelMessage("You already have all the blessings.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
end
if player:removeMoney(price)then
for i =1, table.maxn(bless)do
player:addBlessing(bless[i])
end
player:sendTextMessage(MESSAGE_INFO_DESCR,"You have bought all blessings.")
player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
else
player:sendCancelMessage("You don't have enough money.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end
Code:
local price =20000
function onSay(player, words, param)
if player:removeMoney(price) then
player:getPosition():sendMagicEffect(CONST_ME_YELLOWENERGY)
player:addItem(2173,1) else
player:getPosition():sendMagicEffect(CONST_ME_POFF)
player:sendCancelMessage("You don't have enough money.")
end
end
Enjoy ~
Last edited: