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

Movement? Action? Help!

Status
Not open for further replies.

Archez

'
Senator
Joined
Jun 26, 2008
Messages
6,589
Solutions
1
Reaction score
70
Location
Mexico
I need the help of an experienced scripter!

I usualy try to make my 'own' scripts, by watching/editing other people scripts, but this time I need your help scripters! I don't have more time now to test/make/edit/bla bla my scripts, I'm going to school again.

Can you help me out?

Here's an example, well done in paint. o_O

script.png


I appreciate your help, thank you!
I won't forget to add credits to you when I run my OT. :D
 
credits to TFS, just edited little things :)

PHP:
<movevent type="StepIn" actionid="53452" event="script" value="weyouwant.lua" />

Lua:
local playerPosition = 
{
	{x = 273, y = 234, z = 4, stackpos = STACKPOS_TOP_CREATURE},
	{x = 274, y = 234, z = 4, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
	{x = 278, y = 234, z = 4},
	{x = 279, y = 234, z = 4}
}

local player = {0, 0}
local failed = TRUE
	
function onStepIn(cid, item, position, fromPosition)
    for i = 1, 2 do
			player[i] = getThingfromPos(playerPosition[i])
				if isPlayer(player[i].uid) == TRUE then
		        failed = FALSE
				end 
		
	end

			if failed == TRUE then
				doPlayerSendCancel(cid, "Sorry, not possible.")
				return TRUE
			end
		
		
		for i = 1, 2 do
			doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
			doTeleportThing(player[i].uid, newPosition[i])
		end			
	return TRUE
end
 
Thanks for your cooperation! :)

But... the script doesn't work. :eek:

movement.png


I just get the "Sorry, not possible.", and the players don't get teleported.

No errors in console...
Code:
[11/05/2009 16:42:16] Reloaded movements.

After I edited the script: (Just the coords.)

Lua:
  local playerPosition =
{
        {x = 1327, y = 1011, z = 8, stackpos = STACKPOS_TOP_CREATURE},
        {x = 1327, y = 1012, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 1339, y = 1011, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 1339, y = 1012, z = 8, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
        {x = 1329, y = 1021, z = 7},
        {x = 1330, y = 1021, z = 7},
	{x = 1331, y = 1021, z = 7},
	{x = 1332, y = 1021, z = 7}
}

local player = {0, 0}
local failed = TRUE
       
function onStepIn(cid, item, position, fromPosition)
    for i = 1, 2 do
                        player[i] = getThingfromPos(playerPosition[i])
                                if isPlayer(player[i].uid) == TRUE then
                        failed = FALSE
                                end
               
        end

                        if failed == TRUE then
                                doPlayerSendCancel(cid, "Sorry, not possible.")
                                return TRUE
                        end
               
               
                for i = 1, 2 do
                        doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
                        doTeleportThing(player[i].uid, newPosition[i])
                end                    
        return TRUE
end

:eek:
 
Thanks for your cooperation! :)

But... the script doesn't work. :eek:

movement.png


I just get the "Sorry, not possible.", and the players don't get teleported.

No errors in console...
Code:
[11/05/2009 16:42:16] Reloaded movements.

After I edited the script: (Just the coords.)

Lua:
  local playerPosition =
{
        {x = 1327, y = 1011, z = 8, stackpos = STACKPOS_TOP_CREATURE},
        {x = 1327, y = 1012, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 1339, y = 1011, z = 8, stackpos = STACKPOS_TOP_CREATURE},
	{x = 1339, y = 1012, z = 8, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
        {x = 1329, y = 1021, z = 7},
        {x = 1330, y = 1021, z = 7},
	{x = 1331, y = 1021, z = 7},
	{x = 1332, y = 1021, z = 7}
}

local player = {0, 0}
local failed = TRUE
       
function onStepIn(cid, item, position, fromPosition)
    for i = 1, 2 do
                        player[i] = getThingfromPos(playerPosition[i])
                                if isPlayer(player[i].uid) == TRUE then
                        failed = FALSE
                                end
               
        end

                        if failed == TRUE then
                                doPlayerSendCancel(cid, "Sorry, not possible.")
                                return TRUE
                        end
               
               
                for i = 1, 2 do
                        doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
                        doTeleportThing(player[i].uid, newPosition[i])
                end                    
        return TRUE
end

:eek:

You have it as an action if you use that level rofl
 
No I'm not using the switch, I'm using it for another script, that is an action.

The actionid of the movement is on the marble tile.

I don't know what I changed to the script, but it works now.
 
Status
Not open for further replies.
Back
Top