• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved [mod] blessing script

Fu Manchu

Sepultra™
Joined
Jan 28, 2011
Messages
439
Reaction score
9
<?xml version="1.0" encoding="UTF-8"?>
<mod name="TalkCommand: Bless" version="1.3" author="Sepultra's Library" contact="Sepultra" enabled="yes">
<talkaction log="yes" access="0" words="!bless" event="script"><![CDATA[
XML:
function onSay(cid, words, param, channel)
    local blessings, cost = { 1, 2, 3, 4, 5 }, 50000
    for i = 1, #blessings do
        if(getPlayerBlessing(cid, blessings[i])) then
            doPlayerSendCancel(cid, "You already have been blessed by God Sepultra.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        elseif(getPlayerMoney(cid) < cost) then
            doPlayerSendCancel(cid, "You do not have enough money.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        else
            doPlayerAddBlessing(cid, blessings[i])
            doPlayerRemoveMoney(cid, cost)
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have recived all 5 blessings from God Sepultra.")
        end
        return true
    end
end   
    ]]></talkaction>
</mod>


Ok so I'm trying to change the magic effect when then blessing is purchased. So I assume I need to edit the line:

XML:
 	     doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK)

So I believe the effect I'm looking for is SMALLHOLY.

Well when I edit FIREWORK and change it to SMALLHOLY It still does the firework effect. I'm not understanding why. Any one else have a clue?

SOLVED: doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK <<< Had to use the number not the code. soo here is the fix

XML:
doSendMagicEffect(getCreaturePosition(cid),39)
 
Last edited:
No I was trying to make it work as a mod instead of a talkaction Like my !aol script. lol. So that way when it come to updates it make it a lot easier.

I also like how 34 people have looked at this. and your the only one to respond. -.-

Ps... The script work It's just not doing the correct effect like it should :s

like this:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="TalkCommand: Aol" version="1.3" author="Sepultra's Library" contact="Sepultra" enabled="yes">
    <talkaction log="yes" access="0" words="!aol" event="script"><![CDATA[
function onSay(cid, words, param)
        if doPlayerRemoveMoney(cid, 10000) then
            doPlayerAddItem(cid,2173,1)
            doSendMagicEffect(getPlayerPosition(cid),12)
            doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You've bought an amulet of loss!")
        else
            doPlayerSendCancel(cid,"You don't have enough money.")
            doSendMagicEffect(getPlayerPosition(cid),2)
        end
    return true
end  
    ]]></talkaction>
</mod>
 
Last edited:
Back
Top