Jump to content
  • 0

Continous Specialeffect


Question

Posted

Hi!

I would like to create a continuous effect on an NPC, which is active not only when I click on it, but that is always visible, even if I click sull'NPC. Is it possible?
 
Thanks in advance!
 
(Sorry for my terrible English.. )

13 answers to this question

Recommended Posts

Posted

You can do it by using the freeloop command and then use sleep.

 

The following code will display effect #70 every 0.5 secs after it's loaded.

OnInit:
	freeloop(1);
	while(!.xxx) {
		specialeffect 70;
		sleep 500;
	}
Posted (edited)

Oh great, finally one! Thanks for reply;
the "xxx" what mean?
Because I try to set it like that, but it doesn't work:

 

 

prontera,102,102,3 script SpecialEffect 66,{
 
OnInit:
freeloop(1);
while(!.xxx) {
specialeffect 70;
sleep 500;
}
mes "Done";
close;
 
}

 

 

Edited by ProtoMan
Posted

Something like this would also work.

prontera,102,102,3	script	SpecialEffect	66,{
	mes "Done";
	close;

OnInit:
OnTimer500:
	specialeffect 70;
	initnpctimer;
}
Posted (edited)

It won't work because you placed the mes command under the OnInit label. OnInit triggers everytime the server is (re)loaded (in which no player is attached to the script), while mes needs an attached player to function, so that's probably why it isn't working. The mes command contradicts the OnInit label.

 

.xxx is a variable, but it is not declared, which is why I used while(!.xxx). !.xxx means that .xxx has no value. While is a looping function, so as long as !.xxx is true (or .xxx is not declared), it will do the script in it over and over again.

 

So, the correct script would be:

prontera,102,102,3 script SpecialEffect 66,{

  mes "Done";
  close;

OnInit:
	freeloop(1);
	while(!.xxx) {
	specialeffect 70;
	sleep 500;
	}

}

On a side note, Skorm's method is much easier to do.

Edited by Nerfwood
Posted (edited)

Nothing, I try them but don't cast the effect, maybe I wrong anything? Damn, I don't understant this thing of the specialeffect (continous) ;

 

sorry anyway for my bad english

Edited by ProtoMan
Posted

Nothing, I try them but don't cast the effect, maybe I wrong anything? Damn, I don't understant this thing of the specialeffect (continous) ;

 

sorry anyway for my bad english

 

And you're sure you have /effect enabled? It works fine for me what emulator are you using?

Posted

In my server it doesen't work, damn...
Anyway I understand about the effects of maps, thank you;

I, anyway, mean; I load the NPC that you've post, @load it and click on it, but nothing happen <_>

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