Jump to content

Question

Posted

Hello everyone, can i request an @hold command. it has a function that the players CAN'T walk, but can cast skills and attack. This one is useful during GVG to avoid slide due to lag spikes. Thank you in advance. Ciao

4 answers to this question

Recommended Posts

Posted

Nothing happens whenever i'm using @hold commands.  /pat

 

Maybe like this?

 

-	script	hold	-1,{

	OnInit:
		bindatcmd("hold", strnpcinfo(3)+"::OnHold");
		end;

	OnHold:
		if ( !@Hold ) {
			set @Hold, 1;
			message strcharinfo(0), "Hold mode is ON.";
			pcblockmove getcharid(3), 1;
		} else {
			set @Hold, 0;
			message strcharinfo(0), "Hold mode is OFF.";
			pcblockmove getcharid(3), 0;
		}

}
Posted (edited)

 use @refresh  /ok  make @refresh all 5 sec

-	script	Hold	-1,{
	
	
OnInit:
while(1) {
bindatcmd("hold", strnpcinfo(3) +"::OnAFK");
end;

OnAFK:
if (@Hold) {
set @Hold, 0;
dispbottom "Hold mode is OFF.";
end;
} else {
set @Hold, 1;
new:
if(@Hold==1)
atcommand "@refresh";
sleep2 5000;
goto new;
}
}
}
Edited by EL Dragon
Posted

 

 use @refresh  /ok  make @refresh all 5 sec

-	script	Hold	-1,{
	
	
OnInit:
while(1) {
bindatcmd("hold", strnpcinfo(3) +"::OnAFK");
end;

OnAFK:
if (@Hold) {
set @Hold, 0;
dispbottom "Hold mode is OFF.";
end;
} else {
set @Hold, 1;
new:
if(@Hold==1)
atcommand "@refresh";
sleep2 5000;
goto new;
}
}
}

 

Nothing happens whenever i'm using @hold commands.  /pat

Posted

 

Nothing happens whenever i'm using @hold commands.  /pat

 

Maybe like this?

 

-	script	hold	-1,{

	OnInit:
		bindatcmd("hold", strnpcinfo(3)+"::OnHold");
		end;

	OnHold:
		if ( !@Hold ) {
			set @Hold, 1;
			message strcharinfo(0), "Hold mode is ON.";
			pcblockmove getcharid(3), 1;
		} else {
			set @Hold, 0;
			message strcharinfo(0), "Hold mode is OFF.";
			pcblockmove getcharid(3), 0;
		}

}

 

Works like a gem. Thank you Skorm!  /no1

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