Jump to content
  • 0

@hold commands


awesomazingxed

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   0
  • Joined:  10/24/14
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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;
		}

}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

 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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   0
  • Joined:  10/24/14
  • Last Seen:  

 

 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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   0
  • Joined:  10/24/14
  • Last Seen:  

 

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

Link to comment
Share on other sites

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.

×
×
  • Create New...