Por devotti2, 21 de abr. de 2011 em Actions e Talkactions
info
Grupo: Campones
Registrado: 10/11/10
Posts: 44
Reputação: +22
Char no Tibia: Hacked :S
Venho trazer o !bless ou !buybless.
vá em data/talkactions/scripts e crie um arquivo bless.lua
Adicione isso em bless.lua
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, 50000) == 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!')
doPlayerSendCancel(cid, "You need 50k to get blessed!")
end
return 1
em talkactions.xml adicione a tag:
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />
info
Grupo: Campones
Registrado: 10/11/10
Posts: 44
Reputação: +22
Char no Tibia: Hacked :S
Venho trazer o !bless ou !buybless.
vá em data/talkactions/scripts e crie um arquivo bless.lua
Adicione isso em bless.lua
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, 50000) == 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 50k to get blessed!")
end
end
return 1
end
em talkactions.xml adicione a tag:
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />