Jump to content
  • 0

Please help me setup the setarray. TY


Question

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
6 hours ago, playniks said:

Hi can someone help me on this script please. Setarray doesn't seem to be working. I was repeatedly able to get the same first  item on the list everytime I kill the monster I setup.

Find_the_Treasures.txt 4.29 kB · 3 downloads

.@rand = rand(.chances);

This variable should be set under the OnMobKilled event.

Edited by Nyxz
  • 0
Posted
OnMobKilled:
	//if (playerattached() == 0)
	//	end;
	.@rand = rand(.chances);  // <------------ MISSING THIS LINE
	while (( .@rand -= .item_Rate[.@i] ) >= 0 ) .@i++;

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...