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

Lua Invisible portal if you have an storage value -1

Joined
Jul 18, 2014
Messages
193
Solutions
2
Reaction score
15
Hi, i was thinking in a invisible portal, in other words, if i have the storage 456000 with value -1, i wont see it, but if i have it with value 1, i'll be able to see it.
There's a function that helps me to do that?

Thanks^^
PD: It's for TFS 1.2
 
without changing a lot in tfs, theres no way to show a certain item on map to certain people only
your best option is to use
position:sendMagicEffect(magicEffect[, player = nullptr])
and only send to players who can see it, but its not a tp, just effect, CONST_ME_TELEPORT works
 
without changing a lot in tfs, theres no way to show a certain item on map to certain people only
your best option is to use
position:sendMagicEffect(magicEffect[, player = nullptr])
and only send to players who can see it, but its not a tp, just effect, CONST_ME_TELEPORT works

Yea, magic effects, or texts, would work.
 
without changing a lot in tfs, theres no way to show a certain item on map to certain people only
your best option is to use
position:sendMagicEffect(magicEffect[, player = nullptr])
and only send to players who can see it, but its not a tp, just effect, CONST_ME_TELEPORT works

Yea, magic effects, or texts, would work.

I think isn't the best option, but thanks for responding :)
 
I think isn't the best option, but thanks for responding :)
the only other way is to do a lot of source changes so you can send different pieces of the map to different players, which requires a lot of reworking, which is impossible unless you have really good knowledge of c++, which you dont seem to have, so effects are the best option

good luck finding someone to create phases for you
 
the only other way is to do a lot of source changes so you can send different pieces of the map to different players, which requires a lot of reworking, which is impossible unless you have really good knowledge of c++, which you dont seem to have, so effects are the best option

good luck finding someone to create phases for you
Do you think that i dont have knowledge about programmation? Of course i got them, im just asking for an idea. Please dont judge at less you know me, thanks.
 
Do you think that i dont have knowledge about programmation? Of course i got them, im just asking for an idea. Please dont judge at less you know me, thanks.
It's really not that simple, you're going to face a lot of problem with the client, for example:
If I send a virtual item to the screen of a client at the position (100, 100, 7) but the server doesnt know about that item and then another creature moves in that place, nothing will happen but if that creature leave the tile the player with the virtual item will receive a debug saying that it receive a move creature event for a position that didn't have any creature.

It would be pretty tricky to avoid all the other debug possibilities that this may cause with the client that you might as well just use magic effects as Zothion said or go with OTClient.

Edit:

Something you COULD do to avoid that all easily is to place a rock there and for people that have the storage instead of sending the itemid of a rock you would send the itemid of a portal, then players wouldn't be able to walk on it and whenever the player tried to move to this position you would check if the player has the storage or no.
 
Last edited:
Something you COULD do to avoid that all easily is to place a rock there and for people that have the storage instead of sending the itemid of a rock you would send the itemid of a portal, then players wouldn't be able to walk on it and whenever the player tried to move to this position you would check if the player has the storage or no.

Or you could use a door with the portal locked behind it.
 
It's really not that simple, you're going to face a lot of problem with the client, for example:
If I send a virtual item to the screen of a client at the position (100, 100, 7) but the server doesnt know about that item and then another creature moves in that place, nothing will happen but if that creature leave the tile the player with the virtual item will receive a debug saying that it receive a move creature event for a position that didn't have any creature.

It would be pretty tricky to avoid all the other debug possibilities that this may cause with the client that you might as well just use magic effects as Zothion said or go with OTClient.

Edit:

Something you COULD do to avoid that all easily is to place a rock there and for people that have the storage instead of sending the itemid of a rock you would send the itemid of a portal, then players wouldn't be able to walk on it and whenever the player tried to move to this position you would check if the player has the storage or no.

Or you could use a door with the portal locked behind it.

I guess i'll think in another idea. Thanks for answering :)
 

Similar threads

Back
Top