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

How can i make a remove rs rune?

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
hey any one know how i can make a rune to remove red skull?
insted of going in to db all the time!
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local creatureSkull = getCreatureSkullType(cid)
local playerPos = getCreaturePosition(cid)
    if creatureSkull == SKULL_RED then
	doCreatureSetSkullType(cid, SKULL_NONE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your red skull has been removed.")
	doSendMagicEffect(playerPos, CONST_ME_HOLYDAMAGE)
    else
	doPlayerSendCancel(cid, "You do not have a red skull.")
    end
    return TRUE
end
 
Another one, for 0.3.5 :P

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (not (hasCondition(cid, CONDITION_INFIGHT))) then
		if (getPlayerSkullEnd(cid) > 0) then
			doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
			doCreatureSetSkullType(cid, SKULL_NONE)
			doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now, you\'re free from frags.")
			doRemoveItem(item.uid, 1)
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot use this item while have 0 frag time.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot use this item while have fight status.")
	end
	return TRUE
end
 
Back
Top