• 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 1.2] Push everything to anywhere in screen

Dyabl0

Dyablo
Joined
Sep 22, 2009
Messages
1,866
Solutions
9
Reaction score
280
Location
Spain
I want to know where I can modify this:
Only access 5 should be allowed to push items/monsters/players anything from screen to x place at drop, without going near to it nor receiving Destination is out of reach

This is someting very possibly because I saw it somewhere (experienced myself)
 
I want to know where I can modify this:
well the good solution relies in source edit. Somewhere where it checks if item can be moved from distance.

But you can also hax it in with lua codes, by making a handle/variable what will load the item.
you can use talkaction to activate such feature or by doublelooking item or whatver you think is convenient.

and you can move the userdata to other place by looking another spot or throw item there, or whatever you think is convenient.

Although be careful moving userdatas manually. If they get lost in process your server might crash.
(to make sure that wont happen, the instead of userdata load up the object parameters and depending on them find the userdata when moving is taking place)
 
Should be rather easy if you're experienced with it. What you're looking for has been made for tfs 0.4.

EDIT: In your post it seems like you're looking for something similar to a config where you can either put something to true or false. It's not as easy as that. Read @Xikini post and do some research and you should have a satisfactory result
 
Last edited:
well the good solution relies in source edit. Somewhere where it checks if item can be moved from distance.

But you can also hax it in with lua codes, by making a handle/variable what will load the item.
you can use talkaction to activate such feature or by doublelooking item or whatver you think is convenient.

and you can move the userdata to other place by looking another spot or throw item there, or whatever you think is convenient.

Although be careful moving userdatas manually. If they get lost in process your server might crash.
(to make sure that wont happen, the instead of userdata load up the object parameters and depending on them find the userdata when moving is taking place)

Thank you for answering. I think this has to be done somewhere in sources as you said, so it's there where I will be looking at. Lua coding can be a bit messy in this case, might cause some errors. Thanks again.

Or just set the playerflag for that action to group level 5.
https://otland.net/threads/where-to-find-playerflags.232394/

Problem is that I don't have any action yet.
 
Thank you for answering. I think this has to be done somewhere in sources as you said, so it's there where I will be looking at. Lua coding can be a bit messy in this case, might cause some errors. Thanks again.



Problem is that I don't have any action yet.
Don't have any action yet? What?
I find it hard to believe that flags don't exist in your server.
 
Don't have any action yet? What?
I find it hard to believe that flags don't exist in your server.

Apparently "PlayerCustomFlag_CanThrowAnywhere" and every CustomFlag were removed on TFS 1.x
(note: do not confuse "PlayerCustomFlags"with "PlayerFlags")

It should not be hard to implement anyway
 
How can I add it? I am using TFS 1.2.
Sorry if I've been unclear or unhelpful in any of my posts in your threads. I've done this by converting the functions from tfs 0.4 -> OTH 0.6.3. What you need to do is get tfs 0.4 sources. In const.h all flags are listed under an enum, in tfs 1.2 it's called "enum PlayerFlags". In tfs 0.4, every flag has a special value, e.g 2^0, 2^1, 2^2, 2^3 etc.. However, in tfs 1.2 the values of PlayerFlags are different e.g "PlayerFlag_CanPushAllCreatures = 1 << 21,". Out of my knowledge, you have to see how the binaries work and how they implement the flag values and also convert the functions in game.cpp. Tip: Look for PlayerCustomFlag in the tfs .4 game.cpp to easily find all the code that is associated with what you're looking for.

This post might not have been clear at all, and I'm sorry if that's the case. If you need any further explanation, please send me a pm.

Kind regards,

t0kenz

Edit: At least that's how I did it. For sure you can code it yourself if you have more experience with c++.
 
Sorry if I've been unclear or unhelpful in any of my posts in your threads. I've done this by converting the functions from tfs 0.4 -> OTH 0.6.3. What you need to do is get tfs 0.4 sources. In const.h all flags are listed under an enum, in tfs 1.2 it's called "enum PlayerFlags". In tfs 0.4, every flag has a special value, e.g 2^0, 2^1, 2^2, 2^3 etc.. However, in tfs 1.2 the values of PlayerFlags are different e.g "PlayerFlag_CanPushAllCreatures = 1 << 21,". Out of my knowledge, you have to see how the binaries work and how they implement the flag values and also convert the functions in game.cpp. Tip: Look for PlayerCustomFlag in the tfs .4 game.cpp to easily find all the code that is associated with what you're looking for.

This post might not have been clear at all, and I'm sorry if that's the case. If you need any further explanation, please send me a pm.

Kind regards,

t0kenz

Edit: At least that's how I did it. For sure you can code it yourself if you have more experience with c++.

Thanks for decent reply, it's very appreciated. :)

I will look into that later, very probably might work by playing with that a bit in that case.
 
Back
Top