Jump to content
  • 0

Question

Posted

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?

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...