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

Tile ,Itemremoval

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
I'm Looking for script for a tile that if anyone stand on it,takes from Backpack 10 Crystals to let Ppl pass , if he don't have it's push him back.
version tfs 1.0
Tile x=675 ,y=1197 ,z=9
 
Code:
function onStepIn(cid, item, position, fromPosition)
    local player = Player(cid)
    if not player then
        return true
    end

    if not player:removeMoney(100000) then
        player:teleportTo(fromPosition)
        position:sendMagicEffect(CONST_ME_TELEPORT)
        fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
        return true
    end

    -- something
    return true
end
 
I added it wrong, But Now I added it correctly

But Still there is Wrong


lua script Error: [Movements interface]
data/movements/scripts/tile.lua:onstepin
Data/movements/scripts/tile.lua:2: attemp to call global 'player' <a nil value>
 
Code:
function onStepIn(cid, item, position, fromPosition)
     if isPlayer(cid) == FALSE then
         return TRUE
     end

     if doPlayerRemoveMoney(cid, 100000) == FALSE then
         doTeleportThing(cid, fromPosition)
         doSendMagicEffect(position, CONST_ME_TELEPORT)
         doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
         return TRUE
     end
     
     -- something
     return TRUE
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
     if isPlayer(cid) == FALSE then
         return TRUE
     end

     if doPlayerRemoveItem(cid, 2112, 2) == FALSE then
         doTeleportThing(cid, fromPosition)
         doSendMagicEffect(position, CONST_ME_TELEPORT)
         doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
         return TRUE
     end
    
     -- something
     return TRUE
end

i need a rune maker : I want TO Make My Donation Mana , Etc Can Any One Help me ? !!
You can create a thread with your request, give a detailed explanation of what you are looking for exactly and post your server version and client version.
 
It's Works ok as it's take money from my Backpack but when my Money out it's must push me out but i pass Easily and Have Error Message

lua script Error: [Movements interface]
data/movements/scripts/tile.lua:eek:nstepin
attempt tp index a nil value
 
Try to change fromPosition to a set position.
Code:
function onStepIn(cid, item, position, fromPosition)
     if isPlayer(cid) == FALSE then
         return TRUE
     end

     if doPlayerRemoveMoney(cid, 100000) == FALSE then
         doTeleportThing(cid, {x = 100, y = 100, z = 7})
         return TRUE
     end
 
     -- something
     return TRUE
end
im new here how can i post a thread ?
My Ot 8.60
Click "Post New Thread" right top of the page.
Btw, also post your server version, not just your client version.
 
Back
Top