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

need to make something visible for one players but for others not

fridai

Put banana in your ear!
Premium User
Joined
May 13, 2010
Messages
111
Solutions
1
Reaction score
69
GitHub
fridaii
Twitch
fridai__
So its because of my quest im making, i need to make one "thing" for example tile, visible for one player and for others not <depends on progress of quest> well its only cosmetical i mean it wont have any use except for diffrent look, nothing more. Is it possible? Really important for me.
 
So its because of my quest im making, i need to make one "thing" for example tile, visible for one player and for others not <depends on progress of quest> well its only cosmetical i mean it wont have any use except for diffrent look, nothing more. Is it possible? Really important for me.
You mean like the orbs in Deathzot?
Maybe @Xagul will share his secret :p

Please tell us the distro
 
@Codex NG
What he is requesting is a fair bit more complex than simply sending an animation to 1 player. xD

@frida22
TFS 0.3.6 > When you send the screen to a players client (this is via source btw) you will have to find some way to determine if the tile requires a storage and then check the players storage before sending it to their client. I have no clue where to begin for this btw.

TFS 1.x > There is an entirely new feature you can use to (from what I understand) send just about anything to the client. I am sure it wouldn't be too difficult to send a fake chest to a persons client temporarily. It would however just be a visual since the chest would not actually exist server side.
https://github.com/otland/forgottenserver/wiki/Metatable:NetworkMessage
 
is there any explanation on what they do? some of them have names that doesnt tell me what are they exactly for / any tutorial? tfs 1.x
 
Last edited:
Ok, sending an item to only one player that does not exist is not hard, but it can and will cause debugs in the normal tibia client if you do not do it correctly.

In the OTClient it will just cause terminal errors when anything moves, changes, or is updated on that tile that has the "imaginary item".

This is because of stack positions. If you tell the client there is something, you have to give it a stack positions. Then if TFS sends a request to change, move, modify, or update an item on that tile. There will be more items on that tile in your Client, than there is on TFS. As soon as the client realizes it has too many items. The normal client will Debug, and OTClient starts spamming errors and has graphical issues.

I'm not sure exactly what you are looking to do. (If I knew maybe I could offer a better solution)

But for now, my solutions would be:
  1. If you are willing to use a custom client, you can just make an animation that looks like the item you want to appear. Then play that animation repeating on that tile when a player is on that part of the quest.
  2. Or, you can make it so when a player returns to the previous room, it teleports them to a "new" room, that has the item there where it originally was not.(You would make a duplicate room for each change)
  3. You could close the door to the quest when someone starts the quest. (This makes it so only one person, or a small group of people can do the quest at a time. Similar to Anni where only 4 players can enter at once, that way, those 4 players experience a "fresh" quest, where all the items have not yet appeared yet)
The above options are what I would suggest.
Any of those 3 will work. #1 actually does what you want, and #2 and #3 are just work-arounds to allow you to do what you want without having to send imaginary items.
 
I did this some years ago, it should work fine on the normal client.
SLv3k.jpg
 
I have a very simple function @tarjei wrote for Necronia, which sends an animated effect only to a single player.
However, this will not work on any regular distro, but you can use it as a reference maybe on how to do it. I assume in 1.2~.

Code:
function doSoloEffect(cid, pos, type)
    local player = g_game.getPlayer(cid)
    if player then
        player:sendMagicEffect(pos,type)
        return
    end
    error("Player not found")
end

P.S. We are using OTclient
 
I did this some years ago, it should work fine on the normal client.
SLv3k.jpg

I still think that if anything updates on that tile when the "Imaginary Item" is there, it could cause errors.

For Example:
Player 1 has not completed the quest.
Player 2 has completed the quest.
Player 1 watches Player 2 walk through the tile with the stone.
Player 1 could get debugged.

Example 2:
Player 1 has not completed the quest.
Player 1 throws an item onto the pink stone.
Player 1 could get debugged.

Basically any time that tile has an item or player added/removed/transformed it could debug any player that can see the imaginary item.
Of course, there are ways to fix this, but I have never gotten it 100% working.
(I have players that can be invisible to other players, so it isn't really imaginary items, it works most of the time, but it does have a chance to cause debugs/graphical issues due to stack positions getting mixed up)
 
You have to make sure that you calculate new stackpositions for the player that cannot see the stone, otherwise you will debug the client.
 
"I'm not sure exactly what you are looking to do. (If I knew maybe I could offer a better solution)"
So, ill show you c; that is one ingame item that is actually really big, it is unmoveable, walkable, and under it there will be one more for background and something else for dialog, idea is to make these items that are unmoveable, walkable, just visual effects, seen for only one player that is currently speaking with npc, player will be freezed when talking, and actually, nothing more to explain, i hope everyone understands my idea of making rpg dialogs in tibia :S <btw. anime character was cut really fast so it looks horrible, it was just for presentation>
retertjpg_snaqwpr.jpg
 
"I'm not sure exactly what you are looking to do. (If I knew maybe I could offer a better solution)"
So, ill show you c; that is one ingame item that is actually really big, it is unmoveable, walkable, and under it there will be one more for background and something else for dialog, idea is to make these items that are unmoveable, walkable, just visual effects, seen for only one player that is currently speaking with npc, player will be freezed when talking, and actually, nothing more to explain, i hope everyone understands my idea of making rpg dialogs in tibia :S <btw. anime character was cut really fast so it looks horrible, it was just for presentation>
retertjpg_snaqwpr.jpg

If you are adding sprites. Just make it an animation.
You can loop the animation, just for one character, for as long as you want.
Once the character can move again, you simply stop looping the animation.

That would be the 100% best way to do this, unless you want to use the OTClient, then you could just use Shaders I think. Or make your own custom windows.
 
Back
Top