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

My First Script Dont Work :-(

MagicHereos

Magic.org.pl
Joined
Nov 6, 2008
Messages
60
Reaction score
0
Hello !
I wrote my first script and it... dont work :(
movements - hp.lua :
Code:
function onStepIn(cid, item, pos)
local hp = getPlayerHealth(uid)
if(pos.x == 814) and (pos.y == 1112) and (pos.z == 7)
then
doPlayerSendTextMessage(cid, 19, "Czujesz ukojenie") and doPlayerAddHealth(uid,hp)
doSendAnimatedText(x=814 y=1112 z=7,Przekraczajac bramy rookguardu, czujesz ukojenie...,8)
end
retun 1
end
And movements :
Code:
<movevent event="StepIn" uniqueid="9213" script="hp.lua" />
And I have this error :

[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: attempt to call global 'getPlayerHealth' (a nil value)
[01/01/2004 20:48:41] stack traceback:
[01/01/2004 20:48:41] data/movements/scripts/hp.lua:2: in function <data/movements/scripts/hp.lua:1>
[/code]
:blink::blink:
What I should to give to place of getPlayerHealth?( : Or meaby I have any mistake (error) in it?
Sorry for my English, but i learn it now :p
Thanks,
Magic
 
@UP
Thanks :***
Script delete wall, but dont create it (sorry, not posible) :
Code:
-- Script by Magic
-- Thanks for help, Hermes of OTLand,
-- This script is for MagicOTS
function onUse(cid, item, frompos, item2, topos) 
local wallpos = {x = 612, y = 1177, z = 7, stackpos=1}
local wall = getThingfromPos(cid,wallpos)
if item.actionid == 2345 and item.itemid == 1945 and wall.itemid == 1026 then
doRemoveItem(wall.uid)
doTransformerItem(item.id, item.itemid+1)
elseif item.uid == 2345 and item.itemid == 1946 and wall.itemid == 0 then
doCreateItem(1026,1,wallpos)
doTransformerItem(item.id, item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not posible")
end
return 1
end
 
function onUse(cid, item, frompos, item2, topos)
local wallpos = {x = 612, y = 1177, z = 7, stackpos=1}
local wall = getThingfromPos(cid,wallpos)
if item.actionid == 2345 and item.itemid == 1945 and wall.itemid == 1026 then
doRemoveItem(wall.uid)
doTransformItem(item.id, item.itemid+1)
elseif item.uid == 2345 and item.itemid == 1946 and wall.itemid == 0 then
doCreateItem(1026,1,wallpos)
doTransformItem(item.id, item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not posible")
end
return 1
end
try now
 
PHP:
-- Script by Magic
-- Thanks for help, Hermes of OTLand,
-- This script is for MagicOTS
function onUse(cid, item, frompos, item2, topos) 
local wallpos = {x = 612, y = 1177, z = 7, stackpos=1}
local wall = getThingfromPos(cid,wallpos)
if item.actionid == 2345 and item.itemid == 1945 then
doRemoveItem(wall.uid)
doTransformerItem(item.id, item.itemid+1)
elseif item.uid == 2345 and item.itemid == 1946 then
doCreateItem(1026,1,wallpos)
doTransformerItem(item.id, item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not posible")
end
return 1
end
 
@2xUP
Can you make PW to me with your GG?
And :
Code:
[03/01/2004  15:44:04] Lua Script Error: [Action Interface] 
[03/01/2004  15:44:04] data/actions/scripts/wall.lua:onUse

[03/01/2004  15:44:04] luaDoTransformItem(). Item not found
Delete wall, but dont create :|
@UP
Your script Delete wall, but dont create too :|
 
Try doing two variables of the position, one without the stackpos (for the creation part).

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local oldStone = { x = 621, y = 1177 , z = 7, stackpos = 1 }
    local newStone = { x = oldStone.x, y = oldStone.y, z = oldStone.z }
    
    if item.itemid == 1945 then
        doRemoveItem(getThingfromPos(oldStone).uid, 1)
        doTransformItem(item.uid, item.itemid + 1)
    elseif item.itemid == 1946 then
        doCreateItem(1026, 1, newStone)
        doTransformItem(item.uid, item.itemid - 1)
    end
    return TRUE
end
 
Last edited:
@Macroman
Veeeery Thanks :*
I rewrite my script, when i read you post, and it work 100% EXELETNT !
Rep+
EDIT.
Code:
You must spread some Reputation around before giving it to Macroman again.
wtf?
 
Anytime mate. :) You already gave me a reputation point last night, so you need to give to others (like 5 or so?) then you can give to me again. Although one is more than enough, thank you. :)
 
@UP
Ok, if I give somebody rep+ then I'll give it for you ; )
Now I have better problem :
PHP:
function onStepIn(cid, item, pos)
local newpos1 = {x = 260, y = 1119, z = 10}
local newpos2 = {x = 291, y = 1120, z = 10}
local newpos3 = {x = 273, y = 1139, z = 10}
local newpos4 = {x = 250, y = 1158, z = 10}
local newpos5 = {x = 303, y = 1160, z = 10}
local newpos6 = {x = 271, y = 1178, z = 10}
local newpos7 = {x = 612, y = 1179, z = 7}
		doTeleportThing(cid, newpos1)
	os.time(10000)
		doTeleportThing(cid, newpos2)
	os.time(20000)
		doTeleportThing(cid, newpos3)
	os.time(30000)
		doTeleportThing(cid, newpos4)
	os.time(40000)
		doTeleportThing(cid, newpos5)
	os.time(50000)
		doTeleportThing(cid, newpos6)
	os.time(60000)
		doTeleportThing(cid, newpos7)
end
It teleport me to first room, and give this error :
Code:
[03/01/2004  20:36:44] Lua Script Error: [MoveEvents Interface] 
[03/01/2004  20:36:44] data/movements/scripts/quest3solo.lua:onStepIn

[03/01/2004  20:36:44] data/movements/scripts/quest3solo.lua:10: bad argument #1 to 'time' (table expected, got number)
[03/01/2004  20:36:44] stack traceback:
[03/01/2004  20:36:44] 	[C]: in function 'time'
[03/01/2004  20:36:44] 	data/movements/scripts/quest3solo.lua:10: in function <data/movements/scripts/quest3solo.lua:1>
 
Code:
function onStepIn(cid, item, pos)
	local newpos1 = {x = 260, y = 1119, z = 10}
	local newPos = {
		{x = 291, y = 1120, z = 10},
		{x = 273, y = 1139, z = 10},
		{x = 250, y = 1158, z = 10},
		{x = 303, y = 1160, z = 10},
		{x = 271, y = 1178, z = 10},
		{x = 612, y = 1179, z = 7},
	}
	
    doTeleportThing(cid, newpos1)
	for i = 1, 6 do
		addEvent(doTeleportThing, i * 10000, cid, newPos[i])
	end
	return TRUE
end
 
Help : - (
What's now :
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local x = {
{x = 664, y = 1205, z = 8},
{x = 665, y = 1206, z = 8},
{x = 663, y = 1207, z = 8},
{x = 665, y = 1207, z = 8},
{x = 666, y = 1207, z = 8}
}
local o = {
{x = 665, y = 1205, z = 8},
{x = 666, y = 1205, z = 8},
{x = 664, y = 1206, z = 8},
{x = 666, y = 1206, z = 8}
}
local telepos = {x=696, y=1209, z=8}
for i=1, #o do
for i=2, #x do
if item.itemid == 1945 and getThingfromPos(cid, x) == 2638 and getThingfromPos(cid, o) == 2639 then
doCreateTeleport(1387,telepos,topos)
doTransformItem(item.uid, item.itemid+1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not posible")
end
end
end
end
And there :
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos1 = {
{x = 715, y = 1225, z = 8},
{x = 716, y = 1225, z = 8},
{x = 725, y = 1225, z = 8},
{x = 726, y = 1225, z = 8},
{x = 735, y = 1225, z = 8},
{x = 736, y = 1225, z = 8},
{x = 755, y = 1225, z = 8},
{x = 756, y = 1225, z = 8},
{x = 747, y = 1225, z = 8}
}
local pos2 = {
{x = 720, y = 1225, z = 8},
{x = 721, y = 1225, z = 8},
{x = 730, y = 1225, z = 8},
{x = 731, y = 1225, z = 8},
{x = 740, y = 1225, z = 8},
{x = 741, y = 1225, z = 8}
}
if item.itemid == 1945
	doRemoveItem(getThingfromPos(pos1).uid, 1)
	doCreateItem(1284, 1 , pos2)
	doTransformItem(item.uid, item.itemid+1)
	else
	doRemoveItem(getThingfromPos(pos2).uid, 1)
	doCreateItem(1284, 1 , pos1)
	doTransformItem(item.uid, item.itemid-1)
	end
end
And Fuck Talk :
Code:
[08/01/2004 19:23:13] [Warning - BaseEvents::loadFromXml] Can not open talkactions.xml
[08/01/2004 19:23:13] > ERROR: Unable to load TalkActions!
And Crash OT :/
Talk~~.xml :
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
	<!-- Gods -->
	<talkaction log="yes" words="/closeserver" access="8" function="closeServer"/>
	<talkaction log="yes" words="/openserver" access="8" function="openServer"/>
	<talkaction log="yes" words="/addskill" access="58 function="addSkill"/>
	<talkaction log="yes" words="/attr" access="8" function="changeThingProporties"/>

	<talkaction log="yes" access="7" words="/shutdown" script="shutdown.lua"/>
	<talkaction log="yes" access="7" words="/mode" script="mode.lua"/>

	<!-- Community Managers -->
	<talkaction log="yes" words="/n" access="7" function="placeNpc"/>
	<talkaction log="yes" words="/m" access="7" function="placeMonster"/>
	<talkaction log="yes" words="/reload" access="7" function="reloadInfo"/>
	<talkaction log="yes" words="/raid" access="7" script="raid.lua"/>
	<talkaction log="yes" words="/newtype" access="7" script="newtype.lua"/>
	<talkaction log="yes" words="/r" access="7" script="remove.lua"/>
	<talkaction log="yes" words="/owner" access="7" script="owner.lua"/>
	<talkaction log="yes" words="/s" access="7" function="placeSummon"/>
	<talkaction log="yes" words="/i" access="7" script="createitem.lua"/>
	<talkaction log="yes" access="7" words="!z" script="magiceffect.lua"/>
	<talkaction log="yes" access="7" words="!x" script="animationeffect.lua"/>
	<talkaction log="yes" access="7" words="!y" script="animatedtext.lua"/>
	<talkaction log="yes" access="7" words="/bc" script="broadcastclass.lua"/>
	<talkaction log="yes" access="7" words="/mkick" script="masskick.lua"/>
	<talkaction log="yes" access="7" words="/save" script="save.lua"/>
	<talkaction log="yes" access="7" words="/clean" script="clean.lua"/>
	
	<!-- Gamemasters -->
	<talkaction log="yes" words="/c" access="6" script="teleporthere.lua"/>
	<talkaction log="yes" words="/kick" access="5" script="kick.lua"/>
	<talkaction log="yes" words="/send" access="6" script="teleportsend.lua"/>
	<talkaction log="yes" words="/unban" access="6" script="unban.lua"/>

	<!-- Very Important People (VIP) -->	
	<talkaction log="yes" access="4" words="/reports" script="reports.lua"/>
	<talkaction log="yes" access="4" words="/mc" script="multicheck.lua"/>
	<talkaction log="yes" words="/t" access="4" script="teleportmaster.lua"/>
	<talkaction log="yes" words="/goto" access="4" script="teleportto.lua"/>
	<talkaction log="yes" words="/a" access="4" script="teleporttiles.lua"/>
	<talkaction log="yes" words="/ghost" access="4" function="ghost"/>
	<talkaction log="yes" words="/squelch" access="4" function="squelch"/>
	<talkaction log="yes" words="/cliport" access="4" function="clickTeleport"/>
	<talkaction log="yes" words="/town" access="4" script="teleporttown.lua"/>
	<talkaction log="yes" words="/up" access="4" script="teleportfloor.lua"/>
	<talkaction log="yes" words="/down" access="4" script="teleportfloor.lua"/>
	<!-- Senior Tutors -->
	<talkaction log="yes" words="/notations" access="3" script="notations.lua"/>
	<talkaction log="yes" words="/info" access="3" script="playerinfo.lua"/>
	<talkaction log="yes" words="/gethouse" access="3" script="gethouse.lua"/>
	<talkaction log="yes" access="3" words="/b" script="broadcast.lua"/>

	<!-- Tutors -->
	<talkaction log="yes" words="/baninfo" access="2" function="showBanishmentInfo"/>
	<talkaction log="yes" access="2" words="!pos" script="position.lua"/>

	<!-- Players -->
	<talkaction words="!frags" script="frags.lua"/>
	<talkaction words="!buyhouse" function="buyHouse"/>
	<talkaction words="!sellhouse" function="sellHouse"/>
	<talkaction words="!createguild" function="createGuild"/>
	<talkaction words="!joinguild" function="joinGuild"/>
	<talkaction words="!buypremium" script="buypremium.lua"/>
	<talkaction words="!leavehouse" script="leavehouse.lua"/>
	<talkaction words="/online" script="online.lua"/>
	<talkaction words="!changender" script="changender.lua"/>
	<talkaction words="/uptime" script="uptime.lua"/>
	<talkaction words="/deathlist" script="deathlist.lua"/>
	<talkaction words="/pvp" script="pvp.lua"/>
	<talkaction words="!q" script="money.lua"/>
	<talkaction words="/serverinfo" script="serverinfo.lua"/>
	<talkaction words="!sex" script="sex.lua"/>
</talkactions>
 
Last edited:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
    <!-- Gods -->
    <talkaction log="yes" words="/closeserver" access="8" function="closeServer"/>
    <talkaction log="yes" words="/openserver" access="8" function="openServer"/>
    <talkaction log="yes" words="/addskill" access="58" function="addSkill"/>
    <talkaction log="yes" words="/attr" access="8" function="changeThingProporties"/>

    <talkaction log="yes" access="7" words="/shutdown" script="shutdown.lua"/>
    <talkaction log="yes" access="7" words="/mode" script="mode.lua"/>

    <!-- Community Managers -->
    <talkaction log="yes" words="/n" access="7" function="placeNpc"/>
    <talkaction log="yes" words="/m" access="7" function="placeMonster"/>
    <talkaction log="yes" words="/reload" access="7" function="reloadInfo"/>
    <talkaction log="yes" words="/raid" access="7" script="raid.lua"/>
    <talkaction log="yes" words="/newtype" access="7" script="newtype.lua"/>
    <talkaction log="yes" words="/r" access="7" script="remove.lua"/>
    <talkaction log="yes" words="/owner" access="7" script="owner.lua"/>
    <talkaction log="yes" words="/s" access="7" function="placeSummon"/>
    <talkaction log="yes" words="/i" access="7" script="createitem.lua"/>
    <talkaction log="yes" access="7" words="!z" script="magiceffect.lua"/>
    <talkaction log="yes" access="7" words="!x" script="animationeffect.lua"/>
    <talkaction log="yes" access="7" words="!y" script="animatedtext.lua"/>
    <talkaction log="yes" access="7" words="/bc" script="broadcastclass.lua"/>
    <talkaction log="yes" access="7" words="/mkick" script="masskick.lua"/>
    <talkaction log="yes" access="7" words="/save" script="save.lua"/>
    <talkaction log="yes" access="7" words="/clean" script="clean.lua"/>
    
    <!-- Gamemasters -->
    <talkaction log="yes" words="/c" access="6" script="teleporthere.lua"/>
    <talkaction log="yes" words="/kick" access="5" script="kick.lua"/>
    <talkaction log="yes" words="/send" access="6" script="teleportsend.lua"/>
    <talkaction log="yes" words="/unban" access="6" script="unban.lua"/>

    <!-- Very Important People (VIP) -->    
    <talkaction log="yes" access="4" words="/reports" script="reports.lua"/>
    <talkaction log="yes" access="4" words="/mc" script="multicheck.lua"/>
    <talkaction log="yes" words="/t" access="4" script="teleportmaster.lua"/>
    <talkaction log="yes" words="/goto" access="4" script="teleportto.lua"/>
    <talkaction log="yes" words="/a" access="4" script="teleporttiles.lua"/>
    <talkaction log="yes" words="/ghost" access="4" function="ghost"/>
    <talkaction log="yes" words="/squelch" access="4" function="squelch"/>
    <talkaction log="yes" words="/cliport" access="4" function="clickTeleport"/>
    <talkaction log="yes" words="/town" access="4" script="teleporttown.lua"/>
    <talkaction log="yes" words="/up" access="4" script="teleportfloor.lua"/>
    <talkaction log="yes" words="/down" access="4" script="teleportfloor.lua"/>
    <!-- Senior Tutors -->
    <talkaction log="yes" words="/notations" access="3" script="notations.lua"/>
    <talkaction log="yes" words="/info" access="3" script="playerinfo.lua"/>
    <talkaction log="yes" words="/gethouse" access="3" script="gethouse.lua"/>
    <talkaction log="yes" access="3" words="/b" script="broadcast.lua"/>

    <!-- Tutors -->
    <talkaction log="yes" words="/baninfo" access="2" function="showBanishmentInfo"/>
    <talkaction log="yes" access="2" words="!pos" script="position.lua"/>

    <!-- Players -->
    <talkaction words="!frags" script="frags.lua"/>
    <talkaction words="!buyhouse" function="buyHouse"/>
    <talkaction words="!sellhouse" function="sellHouse"/>
    <talkaction words="!createguild" function="createGuild"/>
    <talkaction words="!joinguild" function="joinGuild"/>
    <talkaction words="!buypremium" script="buypremium.lua"/>
    <talkaction words="!leavehouse" script="leavehouse.lua"/>
    <talkaction words="/online" script="online.lua"/>
    <talkaction words="!changender" script="changender.lua"/>
    <talkaction words="/uptime" script="uptime.lua"/>
    <talkaction words="/deathlist" script="deathlist.lua"/>
    <talkaction words="/pvp" script="pvp.lua"/>
    <talkaction words="!q" script="money.lua"/>
    <talkaction words="/serverinfo" script="serverinfo.lua"/>
    <talkaction words="!sex" script="sex.lua"/>
</talkactions>

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local x = {
		--{x = 664, y = 1205, z = 8},
		{x = 665, y = 1206, z = 8},
		{x = 663, y = 1207, z = 8},
		{x = 665, y = 1207, z = 8},
		{x = 666, y = 1207, z = 8}
	}
	local o = {
		{x = 665, y = 1205, z = 8},
		{x = 666, y = 1205, z = 8},
		{x = 664, y = 1206, z = 8},
		{x = 666, y = 1206, z = 8}
	}
	local telepos = { x = 696, y = 1209, z = 8 }
	local ret = "false"
	if item.itemid == 1945 then
		for xx = 1, #x do
			for oo = 1, #o do
				if getThingfromPos(cid, x[xx]).itemid == 2638 and getThingfromPos(cid, o[oo]) == 2639 then
					doCreateTeleport(1387, telepos, toPosition)
					ret = "true"
				end
			end
		end
		if ret == "true" then
			doTransformItem(item.uid, item.itemid + 1)
		end
	else
		return FALSE
	end
	return TRUE
end

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local pos1 = {
		{x = 715, y = 1225, z = 8},
		{x = 716, y = 1225, z = 8},
		{x = 725, y = 1225, z = 8},
		{x = 726, y = 1225, z = 8},
		{x = 735, y = 1225, z = 8},
		{x = 736, y = 1225, z = 8},
		{x = 755, y = 1225, z = 8},
		{x = 756, y = 1225, z = 8},
		{x = 747, y = 1225, z = 8}
	}
	local pos2 = {
		{x = 720, y = 1225, z = 8},
		{x = 721, y = 1225, z = 8},
		{x = 730, y = 1225, z = 8},
		{x = 731, y = 1225, z = 8},
		{x = 740, y = 1225, z = 8},
		{x = 741, y = 1225, z = 8}
	}
	if item.itemid == 1945
		for i = 1, #pos1 do
			doRemoveItem(getThingfromPos(pos1[i]).uid, 1)
		end
		for i = 1, #pos2 do
			doCreateItem(1284, 1 , pos2[i])
		end
		doTransformItem(item.uid, item.itemid+1)
	else
		for i = 1, #pos2 do
			doRemoveItem(getThingfromPos(pos2[i]).uid, 1)
		end
		for i = 1, #pos1 do
			doCreateItem(1284, 1 , pos1[i])
		end
		doTransformItem(item.uid, item.itemid-1)
	end
end
 
Last edited:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local x = {
        --{x = 664, y = 1205, z = 8},
        {x = 665, y = 1206, z = 8},
        {x = 663, y = 1207, z = 8},
        {x = 665, y = 1207, z = 8},
        {x = 666, y = 1207, z = 8}
    }
    local o = {
        {x = 665, y = 1205, z = 8},
        {x = 666, y = 1205, z = 8},
        {x = 664, y = 1206, z = 8},
        {x = 666, y = 1206, z = 8}
    }
    local telepos = { x = 696, y = 1209, z = 8 }
    local ret = "false"
    if item.itemid == 1945 then
        for xx = 1, #x do
            for oo = 1, #o do
                if getThingfromPos(cid, x[xx]).itemid == 2638 and getThingfromPos(cid, o[oo]) == 2639 then
                    doCreateTeleport(1387, telepos, toPosition)
                    ret = "true"
                end
            end
        end
        if ret == "true" then
            doTransformItem(item.uid, item.itemid + 1)
        end
    else
        return FALSE
    end
    return TRUE
end
Dont work :/
 
Try this one:

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local x = {
        --{x = 664, y = 1205, z = 8},
        {x = 665, y = 1206, z = 8},
        {x = 663, y = 1207, z = 8},
        {x = 665, y = 1207, z = 8},
        {x = 666, y = 1207, z = 8}
    }
    local o = {
        {x = 665, y = 1205, z = 8},
        {x = 666, y = 1205, z = 8},
        {x = 664, y = 1206, z = 8},
        {x = 666, y = 1206, z = 8}
    }
	local in_telepos = { x = 696, y = 1209, z = 8 }
    local telepos = { x = 696, y = 1209, z = 8 }
    local ret = "false"
    if item.itemid == 1945 then
        for xx = 1, #x do
            for oo = 1, #o do
                if getThingfromPos(cid, x[xx]).itemid == 2638 and getThingfromPos(cid, o[oo]).itemid == 2639 then
                    doCreateTeleport(1387, telepos, in_telepos)
                    ret = "true"
					else
					doPlayerSendCancel(cid,"Sorry, not possible.")
                end
            end
        end
        if ret == "true" then
            doTransformItem(item.uid, item.itemid + 1)
        end
    else
        return FALSE
    end
    return TRUE
end

Added in_telepos to spawn were you whant the teleport to be created...
 
Code:
function onStepIn(cid, item, pos)
	local newpos1 = {x = 260, y = 1119, z = 10}
	local newPos = {
		{x = 291, y = 1120, z = 10},
		{x = 273, y = 1139, z = 10},
		{x = 250, y = 1158, z = 10},
		{x = 303, y = 1160, z = 10},
		{x = 271, y = 1178, z = 10},
		{x = 612, y = 1179, z = 7},
	}
	
    doTeleportThing(cid, newpos1)
	for i = 1, 6 do
		addEvent(doTeleportThing, i * 10000, cid, newPos[i])
	end
	return TRUE
end

= error, never call the function instantly with addEvent, make a new one where you check if player is still ingame:

Code:
function doTeleportPlayer(p)
    local cid, newPos = unpack(p)

    if isPlayer(cid) == TRUE then
        doTeleportThing(cid, newPos)
    end
end

local newpos1 = {x = 260, y = 1119, z = 10}
local newPos = {
	{x = 291, y = 1120, z = 10},
	{x = 273, y = 1139, z = 10},
	{x = 250, y = 1158, z = 10},
	{x = 303, y = 1160, z = 10},
	{x = 271, y = 1178, z = 10},
	{x = 612, y = 1179, z = 7}
}

function onStepIn(cid, item, pos)
    doTeleportThing(cid, newpos1)
	for i, pos in ipairs(newPos) do
		addEvent(doTeleportThing, i * 10000, {cid, pos})
	end
	return TRUE
end
 
Back
Top