Jump to content
  • 0

broadcast instead of npctalk?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

I'm using Mr. Tynne's 4v4 pvp script, but I'm wondering if someone could help me modify it a little here...

This code:

mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the East side.";
if($pvp4nA == 4 && $pvp4nB == 4 && $pvp4nC == 4 && $pvp4nD == 4) { stopnpctimer; goto L_begin;}
close;
end;

How can I turn the npctalk into a serverwide broadcast?

I've tried the annouce variable but it didn't work... help much appreciated!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  8
  • Reputation:   0
  • Joined:  03/22/12
  • Last Seen:  

announce strcharinfo(0)+" has entered the round on the East side.",bc_all;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Could help:

*announce "<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}};

This command will broadcast a message to all or most players, similar to

@kami/@kamib GM commands.

announce "This will be shown to everyone at all in yellow.",0;

The region the broadcast is heard in (target), source of the broadcast

and the color the message will come up as is determined by the flags.

The flag values are coded as constants in db/const.txt to make them easier to use.

Target flags:

- bc_all: Broadcast message is sent server-wide (default).

- bc_map: Message is sent to everyone in the same map as the source of the broadcast (see below).

- bc_area: Message is sent to players in the vicinity of the source.

- bc_self: Message is sent only to current player.

You cannot use more than one target flag.

Source flags:

- bc_pc: Broadcast source is the attached player (default).

- bc_npc: Broadcast source is the NPC, not the player attached to the script

(useful when a player is not attached or the message should be sent to those

nearby the NPC).

You cannot use more than one source flag.

Special flags:

- bc_yellow: Broadcast will be displayed in yellow color (default).

- bc_blue: Broadcast will be displayed in blue color.

- bc_woe: Indicates that this broadcast is 'WoE Information' that can be disabled client-side.

Due to the way client handles broadcasts, it is impossible to set both bc_blue and bc_woe.

The optional parameters allow usage of broadcasts in custom colors, font-weights, sizes etc.

If any of the optional parameters is used, special flag is ignored.

Optional parameters may not work well (or at all) depending on a game client used.

The color parameter is a single number which can be in hexadecimal notation.

For example:

announce "This will be shown to everyone at all in green.",bc_all,0x00FF00;

Will display a global announce in green. The color format is in RGB (0xRRGGBB).

In official scripts only two font-weights (types) are used:

- normal (FW_NORMAL = 400, default),

- bold (FW_BOLD = 700).

Default font size is 12.

Using this for private messages to players is probably not that good an idea,

but it can be used instead in NPCs to "preview" an announce.

// This will be a private message to the player using the NPC that made the

// announcement

announce "This is my message just for you",bc_blue|bc_self;

// This will be shown on everyones screen that is in sight of the NPC.

announce "This is my message just for you people here",bc_npc|bc_area;

https://rathena.svn....pt_commands.txt

So, for your case, remove npctalk and replace it with this:

announce strcharinfo(0)+" has entered the round on the East side.",bc_all;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

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