playniks Posted December 21, 2023 Group: Members Topic Count: 14 Topics Per Day: 0.02 Content Count: 52 Reputation: 2 Joined: 02/23/23 Last Seen: 1 hour ago Share Posted December 21, 2023 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 Quote Link to comment Share on other sites More sharing options...
0 Nyxz Posted December 21, 2023 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 05/12/12 Last Seen: August 5, 2024 Share Posted December 21, 2023 (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 December 21, 2023 by Nyxz Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 30, 2023 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2364 Joined: 10/28/11 Last Seen: Saturday at 07:02 PM Share Posted December 30, 2023 OnMobKilled: //if (playerattached() == 0) // end; .@rand = rand(.chances); // <------------ MISSING THIS LINE while (( .@rand -= .item_Rate[.@i] ) >= 0 ) .@i++; Quote Link to comment Share on other sites More sharing options...
Question
playniks
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
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.