Simonp1512
DBhispano
- Joined
- Feb 22, 2009
- Messages
- 62
- Reaction score
- 3
hi i'm using tfs 1.3 and i found some scripts on the forum one is for bless and the other is for food gives 100 brown mushroom but always is free xd never get the money from the player, i don't know what is wrong i see the code good
pls help
Lua:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 2000) == true then
doPlayerAddItem(cid, 2789, 100)
else
doPlayerSendCancel(cid, 'You don\'t have enough money for food, poor!!.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
Lua:
function onSay(cid)
local player = Player(cid)
local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7
if(not(isPlayerPzLocked(cid))) then
if player:getBlessings() == 5 then
player:sendCancelMessage("You already have been blessed!", cid)
elseif player:removeMoney(totalBlessPrice) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!")
for b = 1, 5 do
player:addBlessing(b, 1)
end
player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
else
player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid)
end
else
player:sendCancelMessage("You can't buy bless while you are in a battle.")
end
end
pls help