• 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!

(Request) !bless including Aol!(RL TIBIA BLESSING)

Fyruz

★★★★★
Joined
Feb 7, 2009
Messages
556
Reaction score
19
Location
127.0.0.1
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, 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 6 crystal coin to get blessed!")
        end
    end    
    return 1
end
I repp +++
 
on prepare death check for 5 blessing and check for skkulls and doCreatureSetDropLoot(cid,false) and make a body.

Try this i donno if it will work :
[in creature script make new file frag.lua]
LUA:
local corpse_ids = {
        [0] = 3065, -- female
        [1] = 3058 -- male
}
function onStatsChange(cid, attacker, type, combat, value)
        if combat == COMBAT_HEALING then
                return true
        end
 
        if getCreatureHealth(cid) > value then
                return true
        end
 if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then
	       if getCreatureSkullType(cid) < 4 then
		       doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize "..getCreatureName(cid)..". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".\n") 
                 doRemoveConditions(cid)
                 doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
                  doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE)
                doSendMagicEffect(getCreaturePosition(cid), 10)
			    if getCreatureSkullType(cid) ~= 1 then
			        doPlayerSendTextMessage(attacker,MESSAGE_STATUS_WARNING,"The murder of "..getCreatureName(cid).." was unjustified.")
					db.executeQuery("UPDATE `killers` SET `unjustified` = `unjustified` + '1' WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(attacker) .. ")")
				end
			end
 end
         return false
 
end

go to creature.xml
Code:
<event type="statschange" name="frag" event="script" value="frag.lua"/>

in login.lua
Code:
registerCreatureEvent(cid, "frag")
 
Last edited:
Back
Top