Jump to content
  • 0
canditw

Adding progressbar to @go command

Question

Is it possible to add a progress bar to the @go command so its like 3seconds before warping? so players cant quickly teleport away from danger, like I'd prefer them using butterfly wings to safety instead of @go command.

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hmm, but it seems that the delay in mumble script is between usage. I would like something like after typing @go they'll have to wait for 3seconds before warping to the area.

Share this post


Link to post
Share on other sites
  • 0

You can place progressbar script command there.

 

Simple example:

 

function go {
	if (.deadlock && !Hp) {
		message strcharinfo(0), "You may not use @go when you are dead.";
	} else if (.town && !getmapflag(strcharinfo(3), mf_town)) {
		message strcharinfo(0), "You may only use @go in towns.";
	} else if (.delay && @go_delay > gettimetick(2)) {
		message strcharinfo(0), "You must wait "+ (@go_delay - gettimetick(2))  +" seconds before warping again.";
	} else if (BaseLevel < getarg(3)) {
		message strcharinfo(0), "You must be at least level "+ getarg(3) +" to warp to this map.";
	} else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp)) {
		message strcharinfo(0), "You are not authorised to warp to this map.";
	} else if (.charge && Zeny < getarg(5)) {
		message strcharinfo(0), "You must have at least "+ getarg(5) +" zeny to warp to this map.";
	} else {
		if (.delay) {
			@go_delay = gettimetick(2) + .delay;
		}
	
		if (.charge) {
			Zeny -= getarg(5);
		}
	        progressbar "0x000000",3;
		warp getarg(0), getarg(1), getarg(2);
		end;
	}
	
	message strcharinfo(0), "@go failed.";
	end;
}

P.S. I used function go from that topic

Edited by kenik

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.