Jump to content
  • 0

script command to terminate script when trying to move


Question

Posted

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

5 answers to this question

Recommended Posts

  • 0
Posted
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);
		
	}
}

 

  • 0
Posted
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

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