• Sign up for September Mapping Competition! The prize includes Otland Premium time.
  • 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!

Feature Elfbot auto attack prevention

Nekiro

Legendary OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,168
Best answers
96
Reaction score
1,056
Last edited:

kubernik

Member
Joined
Jul 4, 2014
Messages
73
Best answers
7
Reaction score
22
Hello, i think that it is not usefull, because this protect only before braindead elfbot user.
Your code simply checks when the target was selected.. if to much then block.

Simple workaround is it:
Code:
auto 100 isnotattacking attack target
ElfBot send packet to target so.. with that code in elfbot:
Code:
auto 100 attack target
You have to just check if player target own target.
in Lua i think better option, but 0.4:

Lua:
function onTarget(cid, target)
    if isPlayer(cid) and isPlayer(target) then
        if getCreatureTarget(cid) ~= 0 or exhaustion.get(cid, 87976564) then
            doPlayerSendCancel(cid, "[RE-ATACK] ~ Please stop using re-attack!")
            if getCreatureTarget(cid) ~= 0 then
                exhaustion.set(cid, 87976564, 2)
            end
            return false
        end
    end
    return true
end
 

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
938
Best answers
23
Reaction score
128
you are sure, this method isn't efficient.
I believe the form you posted will not be efficient either. because players can use this htkeys:
Code:
auto 1 dontlist | if [$target.isonscreen == 1 && $tagertt == 0] {attack target | set $tagertt 1} | if [$target.isonscreen == 0] {set $tagertt 0} | if [$target.isonscreen && $target.name == 0] {attack target} | if [$target.isonscreen && $attacked.name == 0] {attack target | wait 500}
 
Last edited:

kubernik

Member
Joined
Jul 4, 2014
Messages
73
Best answers
7
Reaction score
22
I posted anty braindead elfbot in lua, not 100% protection, i think that it is not possibile, without change packet in client and server side.

Your script is the same like this:
Code:
auto 100 isnotattacking attack target
But, little longer.

isnotattacking - if you have target, elfbot do nothing. If you dont have target, elfbot select target one time.

Attack target - if you have target onscreen, attack.

So..
 

diegozenho

New Member
Joined
Feb 26, 2011
Messages
24
Best answers
0
Reaction score
1
@Nekiro

Hi, I don't speak english, so i'm using google translator, i'll start using your source, and i was following up on git if a person to "/ confirm / master" a last change was made in june because that's the one you posted here, not there? how to always see the changes, now get confused, ehauheuahe, success!
 
OP
Nekiro

Nekiro

Legendary OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,168
Best answers
96
Reaction score
1,056
@diegozenho
Updated main post, try to "click things" next time.
 

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
938
Best answers
23
Reaction score
128
@Nekiro u can help me put in an otx2?
He tried to make the script, but it doesn't work as expected. But this script really not functional.
He got mad at me because I told the truth that the script doesn't work as expected.

If you use this code the script will not block a elfbot attack, and players can use elfbot without problems
Code:
auto 100 isnotattacking attack target
 
OP
Nekiro

Nekiro

Legendary OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,168
Best answers
96
Reaction score
1,056
He tried to make the script, but it doesn't work as expected. But this script really not functional.
He got mad at me because I told the truth that the script doesn't work as expected.

If you use this code the script will not block a elfbot attack, and players can use elfbot without problems
Code:
auto 100 isnotattacking attack target
Your comment is redundant here, if they want to install it even if it is just to test if works or not, then dont force them to stop. I'm not mad at you, I'm mad that I decided to try and waste my time on you.
 

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
938
Best answers
23
Reaction score
128
Your comment is redundant here, if they want to install it even if it is just to test if works or not, then dont force them to stop. I'm not mad at you, I'm mad that I decided to try and waste my time on you.
that go ahead and do their own tests.
 
Top