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

actions/movements simple requests

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
TFS 0.3.6pl1
Anyone can make for me these scripts:
1) You can enter to teleport if you killed all monsters in area (frompos, topos)
2) If you click item, you get random reward from 20 rewards and get teleported to X,Y,Z area (item dont remove)
3) After kill boss, the item id: 3045 its creating at certain position (x: 348, y: 347, z: 7)

Thanks.
 
1)
LUA:
local newPos = {x=EDIT, y=EDIT, z=EDIT}
function onStepIn(cid, item, position, fromPosition)
from = {x=120, y=120, z=7}
to = {x=130, y=130, z=7}
for x = from.x, to.x
    for y = from.y, to.y
        for z = from.z, to.z
            local pos = {x = x, y = y, z = z}
            local v = getTopCreature(pos).uid
            if not isMonster(v) then
               doTeleportThing(cid, newPos)
            else
                doPlayerSendCancel(cid, "You have to kill all monsters in order to use this teleport!")
            end
        end
    end
end
return true
end

3)
LUA:
function onKill(cid, target, lastHit)
if isPlayer(cid) then
   if isMonster(target) then
      if getCreatureName(target) == 'boss' then
         doCreateItem(3045,1, {x=348, y=347, z=7})
      end
   end
end
return true
end
 
Last edited:
Back
Top