• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Remove Red Skull

Lakh

Banned User
Joined
Aug 17, 2011
Messages
189
Reaction score
4
Location
Göteborg, Sweden
Hello, I made a somewhat useful script I guess, so here it is.. Basically, if the player has a red skull, it will remove it, and remove 25cc.. So, enjoy I guess lol

Action Version:

LUA:
local skullNames = {"Yellow", "Green", "White", "Red", "Black"}
local creatureSkull = getCreatureSkullType(cid)	
		function onUse(cid, item, fromPosition, itemEx, toPosition)
			if creatureSkull ~= SKULL_RED then
						if doPlayerRemoveMoney(cid, 250000) then
						doPlayerSendTextMessage(cid, "Your Red Skull has been removed..")
						doCreatureSetSkullType(cid, SKULL_NONE)
                                                db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
				else
					doPlayerSendTextMessage(cid, "Good Boy. You do not have a red skull..")
			end       
		return true
	end

Talkaction Version:

LUA:
local skullNames = {"Yellow", "Green", "White", "Red", "Black"}
local creatureSkull = getCreatureSkullType(cid)	
		function onSay(cid, words, param, channel)
			if creatureSkull ~= SKULL_RED then
						if doPlayerRemoveMoney(cid, 250000) then
						doPlayerSendTextMessage(cid, "Your Red Skull has been removed..")
						doCreatureSetSkullType(cid, SKULL_NONE)
                                                db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
				else
					doPlayerSendTextMessage(cid, "Good Boy. You do not have a red skull..")
			end
		return true
	end
 
Last edited:
Mod Version...

PHP:
<?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>
 
Mod Version...

PHP:
<?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"><=!=[=C=D=A=T=A=[
        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>
His script removes skull only, not frags.
 
what if he doesn't have the money?
use if doPlayerRemoveMoney(cid, 250000)
:p
 
15NT.png


it removes the money if it has it, but if he doesn't have it, it will remove the skull anyway.
 
Back
Top