Jump to content
  • 0

Loop soundeffect command.


Idolo

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   3
  • Joined:  03/30/12
  • Last Seen:  

Hello, I would create an command who can launch sound effect in loop.

I tried this:

-    script    se#atSE    -1,{
Onmse:
if (getgmlevel()==99) {
.song_playing = 1;
initnpctimer;
if ( .song_playing == 1 ) {
sleep2 26000;
soundeffectall "dont_forget_me_not.wav",0,"hugel";
}
OnTimer600000:
stopnpctimer;
.song_playing = 0;
}

OnInit:
  bindatcmd "@soundeffect","se#atSE::Onmse";
end;
}

The song launched after 26sec but it does not start again at end.

Help please.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

-    script    se#atSE    -1,{
OnPlay:
	.Playing = 1;
	initnpctimer;
	while(.Playing == 1) {
		soundeffectall "dont_forget_me_not.wav",0,"hugel";
		sleep 26000;
	}
	end;

OnTimer600000:
	stopnpctimer;
	.Playing = 0;
	end;

OnInit:
	bindatcmd("soundeffect",strnpcinfo(3)+"::OnPlay",99,99);
	end;
}

This should work, not really sure what do you want to make anyway.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   3
  • Joined:  03/30/12
  • Last Seen:  

Yes that's work perfectly thanks to you !

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