Solved Check for fishing rod projectile

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JayBFC

Member
Aug 6, 2017
3
0
0
I have been stuck with one issue for a while now, and it is really starting to get on my nerves. I am coding a custom anti cheat with Skript and everything is working fine, but I have this issue with reach detector where if you have ranged weapons, such as a bow, it would ban you. I fixed this for bows, snowballs and eggs, but I can not fix it for fishing rods. Here is the code for the reach detector:
https://pastebin.com/4SqrEYYR

I have tried the if projectile is a ... method, but it still does not work. I do not get any errors when I reload the script but when I use a fishing rod against a mob / entity it still bans me.

I hope you can help me as quick as possible and I hope you all have a lovely day / night.

Thanks in advance,
Jay.
 
I have been stuck with one issue for a while now, and it is really starting to get on my nerves. I am coding a custom anti cheat with Skript and everything is working fine, but I have this issue with reach detector where if you have ranged weapons, such as a bow, it would ban you. I fixed this for bows, snowballs and eggs, but I can not fix it for fishing rods. Here is the code for the reach detector:
https://pastebin.com/4SqrEYYR

I have tried the if projectile is a ... method, but it still does not work. I do not get any errors when I reload the script but when I use a fishing rod against a mob / entity it still bans me.

I hope you can help me as quick as possible and I hope you all have a lovely day / night.

Thanks in advance,
Jay.
Docs
But erm I think you need the fishing hook expression, in the link above, just test for the range of the fishing hook, or test if the projectile is a fishing hook and then cancel the anti cheat events if it is... good luck.
 
Docs
But erm I think you need the fishing hook expression, in the link above, just test for the range of the fishing hook, or test if the projectile is a fishing hook and then cancel the anti cheat events if it is... good luck.
I will give it a try, thank you.

EDIT: Is there a way I could transfer information (so like fishing = true) to an on damage: event? Because for the reach detector it is on damage, and if I created a variable and called it {fishing.%attacker%} and set it to true in an on fishing event, it would say I cant use attacker outside of a damage / blablabla / blablabla. I hope you understand me. I will check if there are any more responses tomorrow because it is too late atm.
 
Last edited by a moderator:
I will give it a try, thank you.

EDIT: Is there a way I could transfer information (so like fishing = true) to an on damage: event? Because for the reach detector it is on damage, and if I created a variable and called it {fishing.%attacker%} and set it to true in an on fishing event, it would say I cant use attacker outside of a damage / blablabla / blablabla. I hope you understand me. I will check if there are any more responses tomorrow because it is too late atm.
Of course it's possible, try it lol
 
Of course it's possible, try it lol
I am new to Skript, and I have tried a lot but when I tried to use the variable method, I can't use %player% in an "on damage" event and I cant use %attacker% in an "on fishing" event, so when it detects damage dealt to an entity or player with a fishing rod, the anti cheat still bans me. If you could give me some code to try out for this error, then that would be wonderful.

EDIT: For more information, I have an on damage event for reach and on fishing event for the fishing variable. In the on damage event, I can't use %player%, but on fishing I must use %player% in the variable because only on damage events and bla bla bla allow %attacker%.
[doublepost=1502101641,1502089281][/doublepost]Nevermind, I fixed it. It required a lot less lines too! The solution was instead of if projectile is a ... I just had to change all of them bits to damage cause is attack. I'm so happy :emoji_slight_smile: For anyone else who wanted to know how to fix things like this, here is the code that I changed to:
https://pastebin.com/Kbn2Xrsf
 
Status
Not open for further replies.