Hermes
dziwki kola gramy w lola
Hi,
well, I stopped releasing scripts for a while, just because I started new project and it takes a lot of my time. Now this script is a bit useless for me so you can have it. Tested on 0.3.6+ and 0.4 dev, latest rev from privsvn.
Note. It's mod. Add it in xml file in /mods/.
Np.
Regards,
Hermes
well, I stopped releasing scripts for a while, just because I started new project and it takes a lot of my time. Now this script is a bit useless for me so you can have it. Tested on 0.3.6+ and 0.4 dev, latest rev from privsvn.
Note. It's mod. Add it in xml file in /mods/.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Frag Remover" version="1.1" author="Hermes" contact="otland.net" enabled="yes">
<action itemid="9969" event="script"><![CDATA[
local noRemove = {SKULL_WHITE, SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)
if isInArray(noRemove, playerSkull) then
doPlayerSendCancel(cid, "You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif playerSkull == SKULL_NONE then
doPlayerSendCancel(cid, "You don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
doRemoveItem(item.uid, 1)
end
return true
]]></action>
</mod>
Np.
Regards,
Hermes