kito2
www.masteria.net
LUA:
function onThink(pid, interval)
local posx = 46
local posy = 56
local posz = 5
local square1 =
{
{x=posx-1,y=posy-1,z=posz},
{x=posx,y=posy-1,z=posz},
{x=posx+1,y=posy-1,z=posz},
{x=posx+1,y=posy,z=posz},
{x=posx-1,y=posy,z=posz},
{x=posx-1,y=posy+1,z=posz},
{x=posx,y=posy+1,z=posz},
{x=posx+1,y=posy+1,z=posz}
}
local tp = square1[math.random(1, #square1)]
local specificFloor = {x = posx, y = posy, z = posz}
local z = getTopCreature(specificFloor).uid
if isPlayer(z) then
doTeleportThing(z, tp)
doSendMagicEffect(getThingPos(z), 12)
end
return true
end
I have this script, but I don't know how to catch the player and add a storage value... Can anyone give me a clue on this?