cincalok Posted June 15, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 05/13/16 Last Seen: February 3 Share Posted June 15, 2016 Hi all, I am currently working on tr0n's questboard. I have tried to edit the script to make the monsters to be random instead. Specific lines are as below: setarray .MHuntArray[0],1031,1002,1400,1863; set .MHuntMob,.MHuntArray[rand(getarraysize(.MHuntArray))]; AddHunting("Test",1,99,1234,1,0,0,0,.MHuntMob,10); However, it doesn't seem to random it. It only randoms if i @reloadscript Full script as below: http://upaste.me/09a32717014d73d09 Appreciate if anyone can give me an advice or two on this. Thank you. setarray .MHuntArray[0],1031,1002,1400,1863; set .MHuntMob,.MHuntArray[rand(getarraysize(.MHuntArray))]; AddHunting("Test",1,99,1234,1,0,0,0,.MHuntMob,10); Quote Link to comment Share on other sites More sharing options...
0 Stolao Posted June 15, 2016 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Friday at 04:48 PM Share Posted June 15, 2016 That's because it under the OnInit label which is only run on script loading, be to make it random you would need to move that up in the script where a player triggers it. Quote Link to comment Share on other sites More sharing options...
0 cincalok Posted June 16, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 05/13/16 Last Seen: February 3 Author Share Posted June 16, 2016 That's because it under the OnInit label which is only run on script loading, be to make it random you would need to move that up in the script where a player triggers it. Hi Stolao, I did as you said actually before this, putting setarray .MHuntArray[0],1031,1002,1400,1863; set .MHuntMob,.MHuntArray[rand(getarraysize(.MHuntArray))]; right after the script starts. But it seems .MHuntMob is unable to capture the value in AddHunting function that way Appreciate if you could advise me further. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Question
cincalok
Hi all,
I am currently working on tr0n's questboard.
I have tried to edit the script to make the monsters to be random instead.
Specific lines are as below:
However, it doesn't seem to random it. It only randoms if i @reloadscript
Full script as below:
http://upaste.me/09a32717014d73d09
Appreciate if anyone can give me an advice or two on this.
Thank you.
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.