nefinoo
Carnage.flv
Like the tittle say, i need a script to buy bless but the price depends on the level of player
i am using tfs 0.3.6
i am using tfs 0.3.6
Calm down.Didn't you already post in @Xikini's thread the same issue?
local bless = {1, 2, 3, 4, 5}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, table.maxn(bless) do
if getPlayerBlessing(cid, bless[i]) then
doPlayerSendCancel(cid, "You have all the blessings already.")
return true
end
end
if doPlayerRemoveMoney(cid, (getPlayerLevel(cid) * 10000)) == TRUE then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "You have received every blessing.", TALKTYPE_ORANGE_1, cid)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, "You require ".. getPlayerLevel(cid) * 10000 .." gold to receive blessings.")
end
return true
end
Purchase aol the same way?Thanks xikiniworks 100%
Can you made to buy aol too?just adding the price 10000 for the aol
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, (10000)) == TRUE then
doPlayerAddItem(cid, 2173, 1, true)
doCreatureSay(cid, "You have received an aol.", TALKTYPE_ORANGE_1, cid)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, "You require 10000 gold to receive an aol.")
end
return true
end
Purchase aol the same way?
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) if doPlayerRemoveMoney(cid, (10000)) == TRUE then doPlayerAddItem(cid, 2173, 1, true) doCreatureSay(cid, "You have received an aol.", TALKTYPE_ORANGE_1, cid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "You require 10000 gold to receive an aol.") end return true end
Soo.. in order to buy blessings, they are forced to purchase an aol at the same time?.. Okay.NO, Purchase aol and bless in the same way, but the aol just cost 10000 and the bless 100gp each level
local bless = {1, 2, 3, 4, 5}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, table.maxn(bless) do
if getPlayerBlessing(cid, bless[i]) then
doPlayerSendCancel(cid, "You have all the blessings already.")
return true
end
end
if doPlayerRemoveMoney(cid, (getPlayerLevel(cid) * 100) + 10000) == TRUE then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerAddItem(cid, 2173, 1, true)
doCreatureSay(cid, "You have received every blessing and an aol.", TALKTYPE_ORANGE_1, cid)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, "You require ".. (getPlayerLevel(cid) * 100) + 10000 .." gold to receive blessings and an aol.")
end
return true
end