Jack Parsons
Member
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:
XML:
SS:
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).
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
Code:
<talkaction words="Bloody Mary" script="bloodymary.lua"/>
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).