bury
Active Member
- Joined
- Jul 27, 2008
- Messages
- 421
- Solutions
- 7
- Reaction score
- 25
I'm using tfs 0.4
Searched in the forum but it seems that the script I use works for everybody lol
walkback.lua
movements.xml
Thanks you forum.
Searched in the forum but it seems that the script I use works for everybody lol
walkback.lua
Lua:
local SPECIAL_QUESTS = {2001}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if(not isPlayer(cid)) then
return true
end
if(isContainer(item.uid)) then
if(not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) then
return true
end
elseif(getTileInfo(position).creatures <= 1) then
return true
end
if(fromPosition.x == 0) then -- player just logged in
fromPosition = getTownTemplePosition(getPlayerTown(cid))
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
doTeleportThing(cid, fromPosition, true)
return true
end
movements.xml
Code:
<!-- Walkback when walking on quest chest -->
<movevent type="StepIn" itemid="1738" event="script" value="walkback.lua"/>
<movevent type="StepIn" itemid="1740" event="script" value="walkback.lua"/>
<movevent type="StepIn" fromid="1746" toid="1749" event="script" value="walkback.lua"/>
Thanks you forum.