niti
New Member
- Joined
- Nov 22, 2009
- Messages
- 258
- Reaction score
- 2
Hello every1 , I'm using a script " blessedbook" but it doesn't work then i click on the book im using tfs 0.3.6 Here's my script im using if u help me out i'll give rep+
local cfg = {
bless = { 1, 2, 3, 4, 5 },
level = 8
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, table.maxn(cfg.bless) do
if(getPlayerBlessing(cid, cfg.bless)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
return true
end
end
if getPlayerLevel(cid) >= cfg.level then
for i = 1, table.maxn(cfg.bless) do
doPlayerAddBlessing(cid, cfg.bless)
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
end
return true
end
and ofcourse it's in Actions.xml too.
You might say now " write in a tag " but idk how to do that.. ! XD
local cfg = {
bless = { 1, 2, 3, 4, 5 },
level = 8
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, table.maxn(cfg.bless) do
if(getPlayerBlessing(cid, cfg.bless)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
return true
end
end
if getPlayerLevel(cid) >= cfg.level then
for i = 1, table.maxn(cfg.bless) do
doPlayerAddBlessing(cid, cfg.bless)
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
end
return true
end
and ofcourse it's in Actions.xml too.
You might say now " write in a tag " but idk how to do that.. ! XD