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

TFS 0.X Give items only for a player

warriorfrog

Active Member
Joined
Jul 29, 2015
Messages
334
Reaction score
35
I wanna make somethings like first items, reward dailly supplys, weekly items rewards.
But there is a big problem, a player could make a lot chars and gave that items to his main char.
There is a way so i can add potions,runes,items to a player and this items the player can not trade,throw on water on 8.6 (0.4)?
 
Tag them with an attribute (something like "untradable") and then check for that attribute in any situation you can think of where a player could "trade" the item. Off the top of my head: trading, moving item into map/house (and containers in map), putting in equipment slot and swapping it with a ground item, listing on market, and ofc any of those actions on a bag which contains said untradable items. Good luck, it's going to be hell trying to figure out every possible way to exploit it :D!

A much easier "hack" would be to tag the items with a players GUID, then if any player tries to use/move them, they disappear.
 
Could i do something in present, to players recive items inside the present

And somehow add a item like:
Code:
        bp = doPlayerAddItem(cid,1990,1)
        doAddContainerItem(bp,2260,10) -- blank rune

And that items can only be moved on presents

Code:
local presentID = 1990
function onMoveItem(item, fromPosition, toPosition, cid)
    if item == EXCLUSIVE
          toPosition ~= presentID then
             doPlayerSendCancel(cid, "It is a exclusive item, can be only move to a present")
             return true
          end
    end
    if toPosition == presentID then
      if item ~= EXCLUSIVE thend
             doPlayerSendCancel(cid, "Presents can be only used to exclusive items")
             return true

      end
   end
    return true
end

And somehow players can not trade with exclusive items, presents and ondeath destroy the presents
 
The script you have won't run because it has a few errors; missing or incorrectly named keywords.
Lua:
local presentID = 1990
function onMoveItem(item, fromPosition, toPosition, cid)
    if item == EXCLUSIVE and toPosition ~= presentID then
        doPlayerSendCancel(cid, "It is a exclusive item, can be only move to a present")
    end
    if toPosition == presentID and item ~= EXCLUSIVE then
        doPlayerSendCancel(cid, "Presents can be only used to exclusive items")
    end
    return true
end
 
It was just an idea, i have no idea how to make it to work, was just a pseudo code :D
So it is possible to do? Present as the store from real tibia?

How to create this exclusives?
So i can run this onMoveItem script to work?
 
Back
Top