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

TFS 1.X+ Frag remover doll and change name doll

Haskys

Member
Joined
Jul 19, 2019
Messages
97
Reaction score
8
Location
Poland
Hey,
Can anyone share a script for an object changing the character's nickname and removing the red and black skull for the TFS 1.2 engine? It would also be useful to have a small manual how to implement it.

Of course, rep!

Haskys
 
You can use without proteccion zone
Code:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
--local tile = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)
--if not tile then
--player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be in protection zone to use this item.")
--return true
--end
if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
player:setSkull(SKULL_NONE)
player:setSkullTime(0)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName()))
item:remove(1)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end

return true
end
only use inside protecion zone.
Code:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
local tile = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE)
if not tile then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be in protection zone to use this item.")
return true
end
if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
player:setSkull(SKULL_NONE)
player:setSkullTime(0)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName()))
item:remove(1)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end

return true
end
 
Back
Top