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

Lua Mystic Flame Teleport

cuba

New Member
Joined
Feb 24, 2015
Messages
136
Reaction score
2
hello otland can anyone tell me how i make my mystic flame tp me to another way
 
If your ever looking for scripts, find one's that are very similar to what you need and edit them.
For example this thread contains a script that teleports only sorcerer's to the new location.
I will take the fixed script and post it here.
Code:
function onStepIn(cid, item, position, fromPosition)
   if isPlayer(cid) and isSorcerer(cid) then
     doTeleportThing(cid, {x = 1243, y = 998, z = 15})
     doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
   else
     doPlayerSendCancel(cid, "Only sorcerers may enter.")
   end
end
So now that you have a working script, remove the parts that you don't require.
Code:
function onStepIn(cid, item, position, fromPosition)
   doTeleportThing(cid, {x = 1243, y = 998, z = 15})
   doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
Of course if you don't want the teleport effect you can remove that as well!
Code:
function onStepIn(cid, item, position, fromPosition)
   doTeleportThing(cid, {x = 1243, y = 998, z = 15})
end
Once you have your actual script made, you can install it into movements/or/actions/or/creaturescripts (of course depending on the script your wishing to make).
Just use the existing lines and modify them to find the script you just created.
Code:
<movevent type="StepIn" actionid="45001" event="script" value="mystic_flame_teleport.lua"/>
Once you have your script created, your next step is to add it to your map.
Change your mystic flame sprite's actionID to the specified actionID in your movements.xml.
Save your map, restart server.

Of course you'll start learning how to create these scripts on your own by combining scripts in new ways for idea's that you have in the future. Just play around and have fun, and soon you'll be helping people on these forums create their first teleport script as well. :p

Xikini
 
Last edited:
Back
Top