Jump to content
  • 0

Question

Posted (edited)

I'm trying to create a NPC that can only be accessible one at a time,

And i can't figure out to make it behave like i want.

prontera,154,178,4	script	Hati	835,{
	
	OnInit:
		set .CanTalk,0;
		
		if(.CanTalk == 0) {
			set .CanTalk,1;
			mes "hello, world!";
			close2;
			set .CanTalk,0;
		}
		else
			mes "I'm talking to someone, please back in a moment";
				
	while (.CanTalk == 1)
	{
		specialeffect EF_BEGINSPELL6;
		sleep 425;
	}	
			
	end;
	
}

@Emistry

how to make the npc usable one at a time?

 

best regards /ene

Edited by Eat Sleep Dota

3 answers to this question

Recommended Posts

Posted

Try this.

prontera,154,178,4	script	Hati	835,{

	if(.CanTalk == 0) {
		set .CanTalk,1;
		mes "hello, world!";
		close2;
		set .CanTalk,0;
		end;
	}
	else {
		mes "I'm talking to someone, please back in a moment";
		end;
	}
				
	while (.CanTalk == 1)
	{
		specialeffect EF_BEGINSPELL6;
		sleep 425;
	}	
			
	end;
	
	OnInit:
		set .CanTalk,1;
	end;	
}

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...