• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Teleport's

Nerevr back

Member
Joined
Nov 7, 2014
Messages
269
Reaction score
7
Need script for add exhaustion on stepin example " if player stepin action xxxx and he tped to zzzz i need player can't stepin again on xxxx after 2 min

2: need script for items make player invisible for 5 sec .

3: need monster when touch player send him to temple like zombile event.

im Use Tfs 0.4
 
about
Code:
2: need script for items make player invisible for 5 sec .

use this
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)
setCombatCondition(combat, condition)

function onUse(cid, item, fromPosition, itemEx, toPosition)
doRemoveItem(item.uid, 1)
if getCreatureCondition(cid, CONDITION_INVISIBLE) == true then
else
doAddCondition(cid, condition)
end
return TRUE
end
 
3.
creaturescripts.xml
Code:
<event type="combat" name="Teleport" event="script" value="tpmonster.lua"/>
tpmonster.lua
Code:
function onCombat(cid, target)
     if isPlayer(target) then
         doTeleportThing(target, {x = 100, y = 100,  z = 7})
     end
     return true
end

Register the event in the monster xml file (so not in login.lua).
Code:
<script>
     <event name="Teleport"/>
</script>

About the first one, once someone stepped into a teleport, the player can never enter again after 2 minutes, but the teleport will still be there for other players?
 
about teleport yes teleport will still for othere players ....and no Register in login?

its work but now player can attack monster :S i did it race="undead" but player can kill him
 
Last edited by a moderator:
Back
Top