Hello World,
is there any plugin which lets high quality metal ore come at the end of the gather-process, to prevent that only hqm get gathered?
thx in advance
Rust High quality metal at gathering end
Discussion in 'Plugin Requests' started by PaCe, Sep 10, 2016.
-
I dont really wanted to request a new plugin, I just wanna have an answer of my question, thx for moving..... no nobody will see it again x)
-
Maybe someone is willing to create a standalone plugin to do this though. -
Thanks for your answere. I have been long time here and normally it doesnt take days.
Then everything what I can do is to wait for it. It has no priority, but its good to have -
I started to think about it but I have a lot of stuff going on. If I ever get free time I will do it.
-
OnDispenserGather hooks in too late to change what is given out.
Could remove the item from the players inventory and give it back, But theres nothing to "tell" you that you have finished hitting the rock.
You could wait till the player has collected 500stone from a rock but then if they are hitting multiple rocks and leaving them unfinished it will mess up with other players gathering them to collect the HQM
EDIT: The hook does trigger BEFORE giving out an item, But how much of Stone/Metal/Sulfur do you give depending on what tool used and have much is left.
Same as above, How do you check when the rock is emtpy (Nothing left but HQM)?
Also how much to give (Different weapons/rock give more/less of an item)Last edited by a moderator: Sep 11, 2016 -
When a player harvests HQM it will deny it(meaning change the amount of HQM given to 0) and add the amount to a dictionary of some sort. Then you detect OnEntityDeath - With that you see if the death of that entity was within lets say 10 meters of the player and if so give him back the HQM. Now I can see a few issues with these but they are easily solvable with a few work around.s -
I played on a server where they had a plugin that did just this so it possible for sure.
-
But if you have gotten to the last stages, it's down to refining as you have the core mechanics working! -
HQM lets you feel that its always first gathered, but by truth its only given out always very early because its the less amount of ore besides each other resource types of ore.
If HQM would be nearly the same amount, it would be gathered like all other ore types:
Example: sulfur, stone, metal, hqm, sulfur, metal, hwm, stone, sulfur, hqm, etc, ....
The item order can't be controlled on this way.
combined with the fact, that there are already hooks called by gather plugins on every hit, thats not want you want to happen on your server only for the effect, that a bit of HQM gets gathered at last hit/on entity death -
-