Nikkster
Programmer
Hello, I need help with 3 different talkactions which are not working properly:
Server version: TFS 0.3.4PL2
The first one is bless.lua it's supposed to give all kind of blessings to your character when saying !bless, it takes the money but it doesn't bless your character, here is the script:
And then we got the aol.lua, same problem as Bless.lua
And the last one, the Demonhunter outfit that you are supposed to recieve for an Ancient Parchment. It takes the Ancient Parchment but you won't get the addon, even if you relog.
Demonhunter.lua
If anyone help me with these, I appreciate and will give you reputation points (19) of course.
/nikkster
Server version: TFS 0.3.4PL2
The first one is bless.lua it's supposed to give all kind of blessings to your character when saying !bless, it takes the money but it doesn't bless your character, here is the script:
Code:
function onSay(cid, words, param)
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You have already got one or more blessings!')
else
if doPlayerRemoveMoney(cid, 60000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
else
doPlayerSendCancel(cid, "You need 6 crystal coin to get blessed!")
end
end
return 1
end
And then we got the aol.lua, same problem as Bless.lua
Code:
local cost = 50000 -- How much does it cost?
local item = 2173 -- What item do you get?
local quantity = 1 -- How many do you get?
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, cost) == 1 then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You have not enough gold.")
end
return 1
end
And the last one, the Demonhunter outfit that you are supposed to recieve for an Ancient Parchment. It takes the Ancient Parchment but you won't get the addon, even if you relog.
Demonhunter.lua
Code:
function onSay(cid, words, param)
removenugget = doPlayerRemoveItem(cid, 8701, 1)
if removenugget == 1 and getPlayerSex(cid) == 0 then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doPlayerAddOutfit(cid, 288, 1)
doPlayerAddOutfit(cid, 288, 2)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You are now a true demonhunter!")
elseif removenugget == 1 and getPlayerSex(cid) == 1 then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doPlayerAddOutfit(cid, 289, 1)
doPlayerAddOutfit(cid, 289, 2)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You are now a true demonhunter!")
end
end
If anyone help me with these, I appreciate and will give you reputation points (19) of course.
/nikkster