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

[Request] Red Skull Remover!

Figaro

Banned User
Joined
Jun 25, 2008
Messages
275
Reaction score
0
Location
696E 2079 6F75 7220 6265 64
Im asking red skull remover script wich cost 10cc, Example: You use lever, it removes your red skull and 10cc, and if u dont have red skull it just says:" You dont have red skull". Hope somebody can help :)
 
Im asking red skull remover script wich cost 10cc, Example: You use lever, it removes your red skull and 10cc, and if u dont have red skull it just says:" You dont have red skull". Hope somebody can help :)

You sure you want a lever?:p You can also do it like !removeredskull or when u stand on a special tile it gets removed.
 
Try this:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

cc = 10 -- How much Crystal Coins does it cost?
money = 100*100*cc

	if item.itemid == 1945 and getCreatureSkullType(cid) > 1 then
		
		if doPlayerRemoveMoney(cid, money) == true then
			doCreatureSetSkullType(cid, 0)
			doTransformItem(item.uid, item.itemid + 1)	
		else
			doPlayerSendCancel(cid, "Sorry, you don't have enough money.")
		end
		
	elseif item.itemid == 1946 then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	else
		doPlayerSendCancel(cid, "You don't have a red skull.")	
	end	
end

I don't know exectly how the skulltype functions work, so tell me the result please.
 
PHP:
local config = {
    money = 100000    
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getCreatureSkullType(cid) == SKULL_RED then
        if doPlayerRemoveMoney(cid, config.money) == TRUE then
            doCreatureSetSkullType(cid, SKULL_NONE)
            doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.")
        else
            doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.")
        end
    else
        doPlayerSendCancel(cid, "You do not have a red skull.")
    end
    
    if item.itemid == 1945 then
        doTransformItem(item.uid, 1946)
    elseif item.itemid == 1946 then
        doTransformItem(item.uid, 1945)
    end
    return TRUE
end
 
Not working :S It doesnt say any error, but i removes money and says "you dont have enough money" and it doesnt remove rs :(

hmm, like I said I don't really know how this function (doCreatureSetSkullType(cid, 0)) works. I hope someone else can help you with it.

Edit: Thanks Chrissy =d
 
PHP:
local config = {
    money = 100000    
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getCreatureSkullType(cid) == SKULL_RED then
        if doPlayerRemoveMoney(cid, config.money) == TRUE then
            doCreatureSetSkullType(cid, SKULL_NONE)
            doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.")
        else
            doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.")
        end
    else
        doPlayerSendCancel(cid, "You do not have a red skull.")
    end
    
    if item.itemid == 1945 then
        doTransformItem(item.uid, 1946)
    elseif item.itemid == 1946 then
        doTransformItem(item.uid, 1945)
    end
    return TRUE
end

This only removed the skull i think the kills wont removed.o

use doPlayerSetRedSkullTicks(cid, amount)
 
how about if I want to decrase 1 frag?

@Edit I tried
PHP:
doPlayerSetRedSkullTicks(cid, 1)

Its working almost fine it set 1 frag but after player log off frags goes to 0

my script
PHP:
local config = {
    money = 100000
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getCreatureSkullType(cid) == SKULL_RED then
        if doPlayerRemoveMoney(cid, config.money) == TRUE then
            doCreatureSetSkullType(cid, SKULL_NONE)
            doPlayerSetRedSkullTicks(cid, 1)
            doRemoveItem(item.uid, 1)
            doPlayerSendTextMessage(cid, 25, "Your skull was removed in exchange for " .. config.money .. " gold pieces.")
        else
            doPlayerSendCancel(cid, "You do not have the " .. config.money .. " gold pieces that is required to perform such action.")
        end
    else
        doPlayerSendCancel(cid, "You do not have a red skull.")
    end

    return TRUE
end
 
Last edited:
Back
Top