Jump to content
  • 0
Zero Human

Attach player in hercules

Question

Hey there,
Is there a way to attach players in hercules? (I know addrid(0) is only in rathena available)
I need this for some scripts like this here:
 

OnBossSpawn:
		announce "Worldboss Ogre King spawned.",bc_all;
		soundeffectall ("se_earth_quake.wav",0);

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

attachrid command allows you to attach to one player, and if you want to attach to all players in the server, I believe you can use getunits to retrieve their GIDs and then loop through this array attaching each player

Share this post


Link to post
Share on other sites
  • 0

What KirieZ said is right, but you should also keep in mind attachrid is not necessary as at one time, 1 player can only have 1 attached script, instead some modification to command would be more effective in terms of performance and reliability 

Share this post


Link to post
Share on other sites
  • 0

Thanks for the answers.

It should come when a World Boss spawn, a server message with Sound (for all players)
The script starts with a timer and not by a player.

Would you have a solution?

Share this post


Link to post
Share on other sites
  • 0

There is soundeffectall (if you want to use wav folder) but I think it doesn't allow you to send to all players in server. Maybe you will need a small source change to use it.

There is also playbgmall, that according to docs allows you to send to the entire server, but from BGM folder.

Share this post


Link to post
Share on other sites
  • 0
prontera,155,185,5	script	kjhdsfks	1_F_MARIA,{
	detachrid;
	.@total = getunits( BL_PC, .@aid, false );
	for ( .@i = 0; .@i < .@total; ++.@i ) {
		attachrid .@aid[.@i];
		soundeffect "ownage.wav", 0;
	}
	end;
}

 

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.