I'm working on an anti-bot script for my server. The player has a given time to reply before being flagged as a potential bot.
The script works fine while I was making it inside a NPC script. I then moved it to a function and made the NPC call the function, and now the timer doesn't attach to the character.
At first I thought that I had to pass the RID and NPC names as arguments into the function but that didn't work. Am I missing something here?
Also the documentation for initnpctimer is terrible. What the hell is a an "attach flag"? Is it expecting a 1(true)? Or is it expecting a character name? Or the RID number?
Question
PedroProplayer
I'm working on an anti-bot script for my server. The player has a given time to reply before being flagged as a potential bot.
The script works fine while I was making it inside a NPC script. I then moved it to a function and made the NPC call the function, and now the timer doesn't attach to the character.
yuno_fild01,125,119,0 script captcha 611,5,5,{ attachnpctimer; initnpctimer;
The above part works. However, when I changed it to this:
yuno_fild01,125,119,0 script captcha::patrol01 611,5,5,{ callfunc "botpatrol",strcharinfo(0),strnpcinfo(2); } function script botpatrol { attachnpctimer; initnpctimer;
At first I thought that I had to pass the RID and NPC names as arguments into the function but that didn't work. Am I missing something here?
Also the documentation for initnpctimer is terrible. What the hell is a an "attach flag"? Is it expecting a 1(true)? Or is it expecting a character name? Or the RID number?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.