Unique Scripter Posted October 25, 2023 Group: Members Topic Count: 4 Topics Per Day: 0.01 Content Count: 9 Reputation: 0 Joined: 09/07/23 Last Seen: November 30, 2024 Share Posted October 25, 2023 My code: morocc,150,172,4 script Give Reward 951,{ end; OnClock2336: Main: addrid(1); getitem 7227, 10; sleep 5000; goto Main; } My problem is players got exponent amount of item. How to resolve this problem? Quote Link to comment Share on other sites More sharing options...
0 jasonch35 Posted October 25, 2023 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 6 Joined: 06/11/23 Last Seen: Monday at 05:50 PM Share Posted October 25, 2023 (edited) `goto Main` runs script all over again every 5000 ms. you should omit it. morocc,150,172,4 script Give Reward 951,{ end; OnClock2336: Main: addrid(1); getitem 7227, 10; } Edited October 25, 2023 by jasonch35 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted January 24, 2024 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 01:10 PM Share Posted January 24, 2024 everything that run after addrid will be repeatedly executed for each attached players. in your case, after your player obtained 10ea of item 7227, then each of this players, trigger the "Main" event again, and give each other another 10ea of 7227 and repeat endlessly. If you wish to trigger it every 5 seconds, you can do it this way. - script Sample -1,{ OnTimer5000: donpcevent strnpcinfo(3)+"::OnReward"; OnInit: initnpctimer; end; OnReward: addrid(5, 0, "prontera"); getitem 7227, 10; end; } Quote Link to comment Share on other sites More sharing options...
Question
Unique Scripter
My code:
morocc,150,172,4 script Give Reward 951,{ end; OnClock2336: Main: addrid(1); getitem 7227, 10; sleep 5000; goto Main; }
My problem is players got exponent amount of item. How to resolve this problem?
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.