Looting Idea

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
I was thinking on hooking into the looting procedure.

My idea is to create a blocking feature that would not allow you to open chests, unless ur friends with the person in Rust++ or Its yours. This would dramatically decrease the usage of Dizzy, however It would take away the point of the game. I was thinking on restricting this to something like if you used C4 on a wall or something, and the owner of the wall has that chest or one of his friends, you can loot It, but only for a specific time, like 20-25 mins. It would also allow you to destroy chests with anything. (If you didnt use c4 u can only destroy chests with guns or explosives maybe)

Sent From My Samsung Galaxy S4
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
The reason why I came up to this, because I noticed laggy players standing on ceilings after spawn, and falling through after like 7 seconds. I tried the Oxide Dizzy and EAC Dizzy, and with a simple laggswitch you can avoid both of them....

Sent From My Samsung Galaxy S4
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Sounds good!
Things to add or ignore :p
- Lock any chest that the player does not own (Apart from being placed on his own structure or a friends) for a few minutes after logging in (If they havenv't move more than x Meters from login location)?
- Only check if a chest is locked if the owner is offline
 
  • Useful
Reactions: DreTaX

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Ye it's good idea.

Anyway another thing to decrease RaidHack is to edit TpFriend and Sleeping Bags usage.
I saw many players use tpglitch to raid houses, the only thing is to add the possibility to use TP only on ground and in own and friends buildings.
For Sleeping Bags, this plugin that I asked it's perfect: http://fougerite.com/threads/sleeping-bags-beds-management.950/
Sadly It's impossible with UnityEngine Overlapsphere (Or couldn't find a way) to get the structure component of the collider, since it returns something different.

Unless I would do a loop through all the structures

https://github.com/Notulp/Fougerite/blob/master/Fougerite/Fougerite/Util.cs#L611
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
There is one simple problem occuring at the moment with this.

I have been patching the assembly straightly for like 8 hours yesterday finding a proper solution.

https://github.com/dretax/LegitRaid/blob/master/LegitRaid.cs#L301

Let's say you want to open a chest. Thats fine, plugin cancels It. You see the "Search" option again, press E but the hook doesn't run from that part again.

Your friend adds you to the whitelist. You try again, same thing. If you reconnect It's fine. For somereason when you press E on an inventory, and it gets cancelled it gets bugged only at you, unless you reconnect.

I found the method that I should use to normally "Eject" the guy out of the inventory without forcing It with RPCs and code:



However that little crap code holds me back from calling It. I tried removing It (With many other craps In It....), It looked fine in the decompiler but after running It, It said Invalid IL code. It's either protected with chains, or I'm doing It wrong.


Most likely the last one. I will see If I'm only able to remove that "return false" for now, but I still need to get rid of the debug message. It's shit If It keeps spamming your console because of the cancelling...