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

[Action/Movements] When player steps in X floor something happens (TFS 0.3.1 CD)

Pentagratta

ancientwars.servegame.com
Joined
Mar 15, 2009
Messages
76
Reaction score
0
Location
São Paulo - Brazil
Greetings,

I come here to ask if someone can help me, I tryed find some actions/movements (?) which do something like that: When player steps in XYZ floor he get teleported for XYZ coord. and the player turns into X creature for X seconds.

I tryed but I dont find nothing like that, Ill be glad if someone could help me!
Ill rep+ ofc.
Thanks!
-srry for bad english-


Regards,

Pentagratta.
 
data/movements/movements.xml
Code:
<movevent event="StepIn" uniqueid="22222" script="teletile.lua"/>

data/movements/scripts/teletile.xml
Code:
function onStepIn(cid, item, position, fromPosition) 

local Monster = Dragon
local Time = 1000
local Pos = {x=100,y=100,z=100}

if item.uid == 22222 then
doPlayerSendTextMessage(cid,22,"You have been teleported and transformed!") 
doPlayerSendCancel (cid,"Hurray!")
doTeleportThing(cid,Pos)
doSetMonsterOutfit(cid, Dragon, Time)
end 
return TRUE 
end

I really, really doubt myself here. No idea if this will work.
I am new to LUA.
 
Last edited:
Try this, I am really only guessing at the problem though.

Code:
function onStepIn(cid, item, position, fromPosition) 

local Monster = dragon
local Time = 1000
local Pos = {x=100,y=100,z=100}

if item.uid == 22222 then
doPlayerSendTextMessage(cid,22,"You have been teleported and transformed!") 
doPlayerSendCancel (cid,"Hurray!")
doTeleportThing(cid,Pos)
doSetMonsterOutfit(cid,Monster,Time)
end 
return TRUE 
end

if that doesn't work, try this!

Code:
function onStepIn(cid, item, position, fromPosition) 

local Monster = 34
local Time = 1000
local Pos = {x=100,y=100,z=100}

if item.uid == 22222 then
doPlayerSendTextMessage(cid,22,"You have been teleported and transformed!") 
doPlayerSendCancel (cid,"Hurray!")
doTeleportThing(cid,Pos)
doSetMonsterOutfit(cid,Monster,Time)
end 
return TRUE 
end

uhm...doSetCreatureOutfit(cid, outfit, time) might work
lets try it

Code:
function onStepIn(cid, item, position, fromPosition) 

local Monster = 34
local Time = 1000
local Pos = {x=100,y=100,z=100}

if item.uid == 22222 then
doPlayerSendTextMessage(cid,22,"You have been teleported and transformed!") 
doPlayerSendCancel (cid,"Hurray!")
doTeleportThing(cid,Pos)
doSetCreatureOutfit(cid,Monster,Time)
end 
return TRUE 
end

Yeah, if any of those don't work someone who is actually good at scripting will have to have a go.
Sorry !
 
Back
Top