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

Remove red skull but not frags!

rakan95

Hoster
Joined
Feb 1, 2013
Messages
25
Reaction score
0
Location
KSA
Hello otland!!!

Is there a way possible me for me to create an item that removes the red skull but not the frags recorded for a player?

I would like someone to give me the script working for the item id 5956 :)

Thanks a lot :)
 
Lua:
function onUse(cid, item, frompos, item2, topos)
    if getPlayerSkullType(cid) >= 1 then
	doCreatureSetSkullType(cid, 0)
  	doPlayerSendTextMessage(cid,27,"Your skull have been removed!")
   	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
    	doRemoveItem(item.uid, 1)	
        doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid)) 
    else
        doPlayerSendTextMessage(cid,25,"You don't have any skull.")		
    end
    return TRUE	
end
XML:
<action itemid="5956" event="script" value="script.lua"/>
 
Last edited:
PHP:
-- Scripted by Leon Zawodowiec --
function onUse(cid, item, frompos, item2, topos)
    local playerskull = getCreatureSkullType(cid)
    local skulls = {
                    SKULL_NONE,
                    SKULL_YELLOW,
                    SKULL_GREEN,
                    SKULL_WHITE
                    }
 
    if isInArray(skulls, playerskull) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove that skull !")
        return 0
    else
        doCreatureSetSkullType(cid, skulls[1])
        doRemoveItem(item.uid, 1)
        db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your Skull has been removed !")
    end
return true
end

Its not my script but I found it when I searched around.
 
Thanks a lot :)

- - - Updated - - -

PHP:
-- Scripted by Leon Zawodowiec --
function onUse(cid, item, frompos, item2, topos)
    local playerskull = getCreatureSkullType(cid)
    local skulls = {
                    SKULL_NONE,
                    SKULL_YELLOW,
                    SKULL_GREEN,
                    SKULL_WHITE
                    }
 
    if isInArray(skulls, playerskull) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove that skull !")
        return 0
    else
        doCreatureSetSkullType(cid, skulls[1])
        doRemoveItem(item.uid, 1)
        db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your Skull has been removed !")
    end
return true
end

Its not my script but I found it when I searched around.

Does this script set your frags to 0 :eek: ?
 
Lua:
function onUse(cid, item, frompos, item2, topos)
 
	doCreatureSetSkullType(cid, 0)
  	doPlayerSendTextMessage(cid,27,"Your skull have been removed!")
   	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
    	doRemoveItem(item.uid, 1)	
        doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid)) 		
    return TRUE	
end
XML:
<action itemid="5956" event="script" value="script.lua"/>

Your script is working properly thanks! But you can use it even if you have no skull! I mean someone can accidentally use it so could you please help me to use it only when you have red skull or black skull ?
 
Updated first post :)

Thanks a lot ! I just have one simple request man! I tried your script!

On my server if you get 20 frags in a day you get rs....

So i made You've got 20 frags today, 34 this week, 34 this month.

I removed the rs! but the problem is now when I kill another player I get 21 frags and the rs is back again! ........ Now my request is! Can you make the frags of the day and the week 0? and the monthly frags stay the same?

Because I dont want the total frags to get affected..........I want the top fragger to remain the same! Cuz if u use another script that deletes all frags..........the top fragger goes away :O I hope you understand what I mean?

Thanks a lot :)
 
Last edited:
Back
Top