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

TalkAction [TFS 1.0] - If you say "Bloody Mary" to a mirror, you die.

Jack Parsons

Member
Joined
Mar 8, 2016
Messages
32
Reaction score
12
Location
São Paulo State, Brazil
I've created a script that kills the player if he stands in front of a wall mirror and speaks "Bloody Mary" (Without quotes). It works with any wall mirror, no matter if it's on the ground or not (Some wall mirrors can be pushed to the ground).

The script:
Code:
function onSay(cid, words, param)
    local p = Player(cid)
    local pPos = p:getPosition()
    local pDir = p:getDirection()
    local mirrors = {
        1816, 1817, 1843,
        1844, 1845, 1846,
        1847, 1848, 1849,
        1850, 1851, 9583,
        9605, 9637, 9638,
        9656, 9657, 9669, 9670
    }
    local mirrorPos = nil
    if pDir == NORTH then
        mirrorPos = {x = pPos['x'], y = pPos['y']-1, z = pPos['z'], stackpos = nil}
    elseif pDir == SOUTH then
        mirrorPos = {x = pPos['x'], y = pPos['y']+1, z = pPos['z'], stackpos = nil}
    elseif pDir == WEST then
        mirrorPos = {x = pPos['x']-1, y = pPos['y'], z = pPos['z'], stackpos = nil}
    elseif pDir == EAST then
        mirrorPos = {x = pPos['x']+1, y = pPos['y'], z = pPos['z'], stackpos = nil}
    end
    local stackPositions = {}
    for i = 0, 9 do
        stackPositions[i+1] = {x = mirrorPos['x'], y = mirrorPos['y'], z = mirrorPos['z'], stackpos = i}
    end
    for i, v in ipairs(mirrors) do
        for _, value in ipairs(stackPositions) do
            local thing = getTileThingByPos(value)
            if thing["itemid"] == v then
                p:say("Bloody Mary", TALKTYPE_MONSTER_SAY)
                doCreatureAddHealth(cid, -100000)
            end
        end
    end
    return false
end
XML:
Code:
<talkaction words="Bloody Mary" script="bloodymary.lua"/>
SS:
Bloody_Mary.png


It's an useless script, but for a twisted mind like mine, it's fun (I love to place evil easter eggs in my map).
 
Should make it spawn an npc behind you that his you for max hp ;)
 
Back
Top