• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction Bless Script !!

life4me

Don't dream it, be it.
Joined
Jun 27, 2009
Messages
928
Reaction score
16
Location
Otland
This is a bless script made by me.



Go to /data/talkactions/script and create a file bless.lua
Lua:
 function onSay(cid, words, param)
if getPlayerBlessing(cid,5) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
end
end
end



Now, goto data/talkactions/talkactions.xml
PHP:
<talkaction words="!bless" script="bless.lua"/>

More comming,:thumbup: Rep if i helped you :)
 
Last edited:
Try to .. TAB .. your Scripts!!

It's horrible..

Lua:
function onSay(cid, words, param)

	if getPlayerBlessing(cid,5) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
	else
		if doPlayerRemoveMoney(cid, 50000) == TRUE then
			for i = 1,5 do
				doPlayerAddBlessing(cid,i)
			end
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
		end
	end
	return TRUE
end

Regards,
Shawak
 
Try to .. TAB .. your Scripts!!

It's horrible..

Lua:
function onSay(cid, words, param)

	if getPlayerBlessing(cid,5) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
	else
		if doPlayerRemoveMoney(cid, 50000) == TRUE then
			for i = 1,5 do
				doPlayerAddBlessing(cid,i)
			end
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
		end
	end
	return TRUE
end

Regards,
Shawak


Im still new /: xD Thx for telling me :thumbup:
 
Try to .. TAB .. your Scripts!!

It's horrible..

Lua:
function onSay(cid, words, param)

    if getPlayerBlessing(cid,5) then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
    else
        if doPlayerRemoveMoney(cid, 50000) == TRUE then
            for i = 1,5 do
                doPlayerAddBlessing(cid,i)
            end
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
        end
    end
    return TRUE
end

Regards,
Shawak

When I use your script or from someone else and I do "!bless" ingame it works but when I die you'll turn back to level 1. I got this with other scripts too. My bless stats in config are like this:

blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

What is wrong?
 
Back
Top