I have these script to when you use a item remove your frags and skull(only work for red and black skull)
The problem is, if you are black skull or red skull and use the item, you lose your skull, but if afther that you kill 1 player you go to black/red skull again?
How can i fix that? Because if the script remove the frags you should need to kill 12 player(is how my confg.lua is setup)
These is my config.lua on the kill part
Lua:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
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
The problem is, if you are black skull or red skull and use the item, you lose your skull, but if afther that you kill 1 player you go to black/red skull again?
How can i fix that? Because if the script remove the frags you should need to kill 12 player(is how my confg.lua is setup)
These is my config.lua on the kill part
Code:
timeToDecreaseFrags = 4 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 8
dayKillsToBlackSkull = 12
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7
Last edited: