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

Action [MOD] Black/red skull and frag remover. Tested on 0.4_DEV

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Reaction score
14
Location
Poland
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/.

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
 
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/.

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


Thats all i do ? and it will work ? or add something else?
Will it work for TFS 0.3.5?
 
Well, it works fine for me. But there is a problem. The red skull goes off but when character die or relog the red skull is still there. Help
 
anyone help ?? when character dies or relog red skull comes back. Frags are on 0
 
lol, it works well... the skull goes off,frags as well. But the problem is when character relog, frags are gone but redskull is still on...

Anyone ?

REP ++
 
lol, it works well... the skull goes off,frags as well. But the problem is when character relog, frags are gone but redskull is still on...

Anyone ?

REP ++
doPlayerSetSkullEnd(cid, 0, SKULL_RED)
I think if u add this line i might work :eek:
Anyway im just searching for A Frag + Redskull remover WITH CHARGES not that i use it 1 time and that it gets transformed or deleted or even worse gets infite.
 
FIXED VERSION FOR TFS 0.3.6

Lua:
<?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) .. ")")
			doCreatureSetSkullType(cid,0)
			doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
			doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
			doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
			doRemoveItem(item.uid, 1)
		end
		return true
	]]></action>
</mod>
 
FIXED VERSION FOR TFS 0.3.6

Lua:
<?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) .. ")")
			doCreatureSetSkullType(cid,0)
			doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
			doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
			doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
			doRemoveItem(item.uid, 1)
		end
		return true
	]]></action>
</mod>
wotks but if the player attack that player that has removed hes skull he dont get skull xd
 
Back
Top