Jump to content
  • 0

Capture the Crystal


rayyyie

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  04/05/18
  • Last Seen:  

Hello rAthena.

can someone help me with this npc :

Quote

prontera,74,62,0    script    Red Crystal    1915,{
        dispbottom "[Red Crystal] Capturing...";
        set .@fcast,15;
        progressbar "ffffff",.@fcast;
        getitem 6480,10;
        specialeffect2 EF_TEMP_OK;
        mapannounce strcharinfo(3),strcharinfo(0)+" has get the Price!",bc_map,"0xff77ff";
        end;}
 

i just tested this NPC, but the cast didnt stop if someone hit me / kill me.
 

i want it stop cast when got hit, and while someone cast on that crystal, the other can't click that crystal.
and the crystal will disappear when someone capture it.

Thank you !

Edited by rayyyie
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

Unfortunately, you cant control the progressbar this way...

U better use sleep or freeze status.
something like:
 

prontera,74,62,0	script	Red Crystal	1915,{
		if (.char == getcharid(3))
			end;
		if (.char)
			sc_end SC_SLEEP,.char;

		.char = getcharid(3);
		getitem 6480,10;
        dispbottom "[Red Crystal] Capturing...";
		mapannounce strcharinfo(3),strcharinfo(0)+" has get the Price!",bc_map,"0xff77ff";
		sc_start SC_SLEEP,.fcast,10;
		sleep2 .fcast;
		if (.char == getcharid(3)){
			.char = 0;
			sc_end SC_SLEEP,.char;
		}
        end;
OnInit:
	   set .fcast,15*1000;
}

 

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