kito2
www.masteria.net
Hey, I have been searching at forum and couldn't find anything... Haven't been using LUA for a few months and forgot somethings about it...
I was trying to get a creature (player) from a certain tile... Tried this but I think it wouldn't work since I need to check if there is another player, but Im sure that this is not working, and also I think that creating the item onStepOut wouldn't work too... Can't remember how to use stackpos.
Can someone help on this?
I was trying to get a creature (player) from a certain tile... Tried this but I think it wouldn't work since I need to check if there is another player, but Im sure that this is not working, and also I think that creating the item onStepOut wouldn't work too... Can't remember how to use stackpos.
LUA:
function onStepIn(cid, item, position, fromPosition) local check_pos1 = x=X1,y=Y1,z=Z1,stackpos=253}
local check_pos2 = x=X2,y=Y2,z=Z2,stackpos=253}
local wall = {x=X3, y=Y3, z=Z3, stackpos=2}
local getwall = getThingfromPos(wall)
if getTileThingByPos(check_pos) > 0 and getTileThingByPos(check_pos) > 0 then
doRemoveItem(getwall.uid)
else
doCreatureSay(cid, "You need a parner on the other sqm.", TALKTYPE_ORANGE_1)
end
return true
end
function onStepOut(cid, item, pos)
local item_c = 1025
doCreateItem(item_c, 1, {x=X4, y=Y4, z=Z4, stackpos=1})
return TRUE
end
Can someone help on this?