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

Lua Please help with this Forever aol REP++ FOR HELP

LuaScripter

Scripter -Lua-
Joined
Jan 16, 2012
Messages
40
Reaction score
1
I saw this script on the forums, and I want to know what Im doing wrong. Im trying to make the aol dissapear if the person that dies, has an RS, or BS.
Lua:
local AMULET= 2196
function onPrepareDeath(cid, deathList) 
    if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == AMULET then 
        if isInArray({SKULL_WHITE, SKULL_YELLOW, SKULL_GREEN, SKULL_NONE}, getCreatureSkullType(cid)) then 
            doSetCreatureDropLoot(cid, false) 
        if getCreatureSkullType(cid, SKULL_RED, SKULL_BLACK) then -- I added this
			doPlayerRemoveItem(cid,2216,1) -- and this, but neither work apparently
        end 
    end 
  
    return true 
end
 
Try this:

Code:
local AMULET = 2196

function onPrepareDeath(cid, deathList) 
    if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == AMULET then 
        if isInArray({SKULL_WHITE, SKULL_YELLOW, SKULL_GREEN, SKULL_NONE}, getCreatureSkullType(cid)) then 
            doSetCreatureDropLoot(cid, false) 
	else
	    doPlayerRemoveItem(cid, 2216, 1)
        end 
    end 
 
    return true 
end
 
its because you probably didn't change the item id........
Lua:
local AMULET = 2196

function onPrepareDeath(cid, deathList) 
    if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == AMULET then 
        if isInArray({SKULL_WHITE, SKULL_YELLOW, SKULL_GREEN, SKULL_NONE}, getCreatureSkullType(cid)) then 
            doSetCreatureDropLoot(cid, false) 
	else
	    doPlayerRemoveItem(cid, 2196, 1) -- <<<
        end 
    end 
 
    return true 
end
 
Back
Top Bottom