Jump to content
  • 0

random box announce null item name


Noire

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Help again, im using of of euphy's script having an error with this when it broadcast it says [null] item bla bla help!.
 

16247,Dragon_Arhat_Mask_Box,Dragon Arhat Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBox"; },{},{}
function script CustomBox {
setarray .BoxItems[0],5597,5596,5594;
 
set .Random, getarraysize( .BoxItems );
getitem .BoxItems[ rand( .Random ) ], 1;
announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Custom Box.",0;
end;
}

post-18342-0-75151600-1455347388_thumb.png

Edited by Emistry
codebox
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you can try this

function	script	CustomBox	{
	.@item = F_Rand( 5597,5596,5594 );
	getitem .@item, 1;
	announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname( .@item )+"] from a Custom Box.",0;
	return;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

 

you can try this

function	script	CustomBox	{
	.@item = F_Rand( 5597,5596,5594 );
	getitem .@item, 1;
	announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname( .@item )+"] from a Custom Box.",0;
	return;
}

Emistry! can you add something like you can get a jackpot prize base on random chance and broadcast from that script? thank you in advance :3

Edited by Noire
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


if ( rand( 10000 ) < 5 ) { // jackpot

.@item = F_Rand( 5597,5596,5594 );

}

else {

.@item = F_Rand( 5597,5596,5594 );

}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

still having issue can you complete the script for me ? >.<

post-18342-0-56297700-1455366525_thumb.png

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Basing from your screenshot, it got 1 extra ' ) '

 

Remove it and it should work.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

Thanks works fine now!

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