Unique Scripter Posted October 25, 2023 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
0 jasonch35 Posted October 25, 2023 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
0 Emistry Posted January 24, 2024 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
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?
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.