Jump to content
  • 0

script command to terminate script when trying to move


Litro Endemic

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

Hi can some body help me

I want to terminate the script when the player trying to move

script example

prontera,150,150,1	scrip	test	112,{
	lockxy; // with this if player try to move from location he is standing script will be terminated and cutin to be cleared
	while (1) {
		.@j++;
		cutin "image_"+.@j, 1;
		dispbottom .@j+"";
		sleep2 500;
	}
	end;
}

i have playing with with addtimer and progressbar but it not to what i want

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

prontera,150,150,1	script	test	112,{
	getmapxy(.@map$,.@x,.@y,0);
	getmapxy(.@map$,.@xc,.@yc,0);
	while (1) {
		if(.@x != .@xc|| .@y != .@yc){
			cutin "", 255;
			end;
		}
		.@j++;
		cutin "image_"+.@j, 1;
		dispbottom .@j+"";
		sleep2 500;
		getmapxy(.@map$,.@xc,.@yc,0);
		
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

20 minutes ago, sader1992 said:

prontera,150,150,1	script	test	112,{
	getmapxy(.@map$,.@x,.@y,0);
	getmapxy(.@map$,.@xc,.@yc,0);
	while (1) {
		if(.@x != .@xc|| .@y != .@yc){
			cutin "", 255;
			end;
		}
		.@j++;
		cutin "image_"+.@j, 1;
		dispbottom .@j+"";
		sleep2 500;
		getmapxy(.@map$,.@xc,.@yc,0);
		
	}
}

getmapxy didn't do what I want,

getmapxy will be executed once on every loop, in your example

if there is multiple pause (sleep2, progressbar, etc) it have to wait to be checked again

what i want when player running the script for every line if he try to walk the script will be terminated

i kind of tried playing with clif_parse_WalkToXY but at lose how to set it

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Why don't you try to block the movement generally? With pcblockmove?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

pcblockmove or unitblockmove is not the one I want

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   9
  • Joined:  01/09/12
  • Last Seen:  

attach timer;

after 1s

check current location and last location

if different, terminal script

end detach timer;

else reset timer;

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