Jump to content
  • 0

add a simple global message


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

Hi friends. I would like to add a global message for everyone to see which item the player received from this script

Spoiler

function    script    randombox    {
setarray .BoxItems[0],501,505,522;


set .Random, rand( getarraysize( .BoxItems ) );
getitem .BoxItems[ .Random ], 1;
end;
}

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

1 hour ago, IsabelaFernandez said:
  Hide contents


script error on npc/custom/albummvp.txt line 7
    parse_simpleexpr: unexpected character
     2 :        setarray(.@box_items, 501, 505, 522);
     3 :
     4 :        .@item = .@box_items[rand(getarraysize(.@box_items))];
     5 :
     6 :        getitem(.@item, 1);
*    7 :        announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!", ')';
     8 :
     9 : return;
    10 : }
 

 

function	script	randombox	{
	setarray(.@box_items, 501, 505, 522);

	.@item = .@box_items[rand(getarraysize(.@box_items))];

	getitem(.@item, 1);
	announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!");

	return;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

function	script	randombox	{
	setarray(.@box_items, 501, 505, 522);

	.@item = .@box_items[rand(getarraysize(.@box_items))];

	getitem(.@item, 1);
	announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!");

	return;
}

 

Edited by Winterfox
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

22 hours ago, Winterfox said:
function	script	randombox	{
	setarray(.@box_items, 501, 505, 522);

	.@item = .@box_items[rand(getarraysize(.@box_items))];

	getitem(.@item, 1);
	announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!", );

	return;
}

 

Spoiler


script error on npc/custom/albummvp.txt line 7
    parse_simpleexpr: unexpected character
     2 :        setarray(.@box_items, 501, 505, 522);
     3 :
     4 :        .@item = .@box_items[rand(getarraysize(.@box_items))];
     5 :
     6 :        getitem(.@item, 1);
*    7 :        announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!", ')';
     8 :
     9 : return;
    10 : }
 

 

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