Hi,
whats wrong with this movement script?
Everytime when someone walk on action id 32361 (Lights.lua script)
he gets an debug.
And in database his outfit is messed up. Like.
Look addons = 255
and looklegs = 1000~
lookbpdy = 1000~
lookfeet = 100~
so it was debugged.
only fix was to make an normal outfit again. than teleporting to temple.
Someone have a clue whats going on with the script?
thx!
repp+_
whats wrong with this movement script?
PHP:
function onStepIn(cid, item, pos)
local storage = 42325
local lightoffid = 12175 --id of light so you can walk
local tpback = {x=33387, y=31142, z=8}
local jail = {x=33362, y=31208, z=8}
local outfit = {lookType = getPlayerStorageValue(cid, 3331), lookHead = getPlayerStorageValue(cid, 3332), lookAddons = getPlayerStorageValue(cid, 3333), lookLegs = getPlayerStorageValue(cid, 3334), lookBody = getPlayerStorageValue(cid, 3335), lookFeet = getPlayerStorageValue(cid, 3336)}
local lightPosition =
{
{x=33385, y=31139, z=8, stackpos = 255},
{x=33385, y=31134, z=8, stackpos = 255},
{x=33385, y=31126, z=8, stackpos = 255},
{x=33385, y=31119, z=8, stackpos = 255},
{x=33385, y=31118, z=8, stackpos = 255}
}
if getPlayerStorageValue(cid,storage) ~= 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, tpback, TRUE)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
else
if (getCreaturePosition(cid).y == lightPosition[1].y) then
peekhole = getTileItemById(lightPosition[1],lightoffid).uid
if peekhole < 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, jail, TRUE)
doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doPlayerRemoveItem(cid, 12245, 1)
end
elseif (getCreaturePosition(cid).y == lightPosition[2].y) then
peekhole = getTileItemById(lightPosition[2],lightoffid).uid
if peekhole < 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, jail, TRUE)
doCreatureChangeOutfit(cid, outfit)
doPlayerRemoveItem(cid, 12245, 1)
doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
end
elseif (getCreaturePosition(cid).y == lightPosition[3].y) then
peekhole = getTileItemById(lightPosition[3],lightoffid).uid
if peekhole < 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, jail, TRUE)
doCreatureChangeOutfit(cid, outfit)
doPlayerRemoveItem(cid, 12245, 1)
doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
end
elseif (getCreaturePosition(cid).y == lightPosition[4].y) then
peekhole = getTileItemById(lightPosition[4],lightoffid).uid
if peekhole < 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, jail, TRUE)
doCreatureChangeOutfit(cid, outfit)
doPlayerRemoveItem(cid, 12245, 1)
doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
end
elseif (getCreaturePosition(cid).y == lightPosition[5].y) then
peekhole = getTileItemById(lightPosition[5],lightoffid).uid
if peekhole < 1 then
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doTeleportThing(cid, jail, TRUE)
doPlayerRemoveItem(cid, 12245, 1)
doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
end
end
end
end
Everytime when someone walk on action id 32361 (Lights.lua script)
he gets an debug.
And in database his outfit is messed up. Like.
Look addons = 255
and looklegs = 1000~
lookbpdy = 1000~
lookfeet = 100~
so it was debugged.
only fix was to make an normal outfit again. than teleporting to temple.
Someone have a clue whats going on with the script?
thx!
repp+_
Last edited: