Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Share Posted April 6, 2018 can someone direct me to a script that does the following 1. if a character reaches 99 it will give a reward 2. total of 100 rewards only on 1st 99 characters 3. if a character leveled to 99 but the count is 101 99 characters, the script will not give reward Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted April 6, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: Monday at 05:33 PM Share Posted April 6, 2018 (edited) 49 minutes ago, Leic said: some problem with the announce line and if lv98 is taking the reward, it's telling all items has been taken. Here, forgot to add check if player is lower than lvl 99. Tick solve and upvote if I helped you, Thanks. // by pajodex // Optimized by AnnieRuru prontera,150,150,0 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; } Edited April 6, 2018 by pajodex Optimized 2 Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted April 6, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: Monday at 05:33 PM Share Posted April 6, 2018 (edited) 1 hour ago, Leic said: can someone direct me to a script that does the following 1. if a character reaches 99 it will give a reward 2. total of 100 rewards only on 1st 99 characters 3. if a character leveled to 99 but the count is 101 99 characters, the script will not give reward // by pajodex prontera,150,150,0 script Race-To-99 100,{ .@item = 501; // Item ID .@amount = 100; // Amount if($ItemGive != 100 && BaseLevel == 99) { if(getreward != 1) { Announce "Congratulations! "+strcharinfo{0}+" has claimed his reward for Race to 99 Event", 0; getitem .@item, .@amount; $ItemGive++; getreward++; sleep 2000; announce "There are "+100 - $ItemGive+" rewards left to give!"; end; } else npctalk "Sorry, Nothing for you!"; end; } else { npctalk "Sorry, all rewards has been taken!"; end; } } Not yet tested, but it should work. Edited April 6, 2018 by pajodex 1 Quote Link to comment Share on other sites More sharing options...
0 Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Author Share Posted April 6, 2018 sorry my bad. it should be globe reg value i think. Once they reach 99. the script checks on how many $maxlevel already took the reward. something like that. if less or equal to 100 value = give reward. Else just a message that he's not eligable to get the rewards. something like onlevelup? Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted April 6, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: Monday at 05:33 PM Share Posted April 6, 2018 1 hour ago, Leic said: sorry my bad. it should be globe reg value i think. Once they reach 99. the script checks on how many $maxlevel already took the reward. something like that. if less or equal to 100 value = give reward. Else just a message that he's not eligable to get the rewards. something like onlevelup? exactly what I did. Test it. Quote Link to comment Share on other sites More sharing options...
0 Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Author Share Posted April 6, 2018 some problem with the announce line and if lv98 is taking the reward, it's telling all items has been taken. strcharinfo{0} was in bracket still the problem is when im lvl 98, still saying all items has been redeemed added <=99 if to fix it. thanks Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted April 6, 2018 @pajodex I read some of your scripts, and I think your script still has some room for improvements maybe you should learn how to streamline your conditions, so others can also read your script easily example in this script poring_w01,100,100,5 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; } put all the false condition before executing the true condition Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted April 6, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: Monday at 05:33 PM Share Posted April 6, 2018 7 minutes ago, AnnieRuru said: @pajodex I read some of your scripts, and I think your script still has some room for improvements maybe you should learn how to streamline your conditions, so others can also read your script easily example in this script poring_w01,100,100,5 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; } put all the false condition before executing the true condition Yeah, I guess I have long way to go! Thanks for the tip @AnnieRuru. I will edit my first post. 1 Quote Link to comment Share on other sites More sharing options...
0 Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Author Share Posted April 6, 2018 another question. i cannot find the $ItemGive where can i find it? Quote Link to comment Share on other sites More sharing options...
0 Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Author Share Posted April 6, 2018 mes "[Race-to-99]"; mes "Ohh ! A level 99 !!"; next; mes "[Race-to-175]"; mes "Let me check if your qualified to get the reward.."; next; getitem 4047,1; getitem 4054,1; getitem 4174,1; ++$ItemGive; getreward = 1; close; announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event !", bc_all; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; problem now is this. when i use close; it doesn't run the announce. then if i remove the close, the message box is just stuck. Quote Link to comment Share on other sites More sharing options...
0 Leic Posted April 6, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 48 Reputation: 0 Joined: 02/27/18 Last Seen: May 3, 2018 Author Share Posted April 6, 2018 mes "[Race-to-99]"; mes "Ohh ! A level 99 !!"; next; mes "[Race-to-175]"; mes "Let me check if your qualified to get the reward.."; next; getitem 4047,1; getitem 4054,1; getitem 4174,1; ++$ItemGive; getreward = 1; close; announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event !", bc_all; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; problem now is this. when i use close; it doesn't run the announce. then if i remove the close, the message box is just stuck. Quote Link to comment Share on other sites More sharing options...
0 skymia Posted May 14, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted May 14, 2020 On 4/6/2018 at 10:44 PM, pajodex said: Here, forgot to add check if player is lower than lvl 99. Tick solve and upvote if I helped you, Thanks. // by pajodex // Optimized by AnnieRuru prontera,150,150,0 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; } How to set the reward with random item? Rare item: costume 1,costume 2,costume 3, etc.... with a 30% chance Normal item: costume 1,costume 2,costume 3, etc.... with a 70% chance Quote Link to comment Share on other sites More sharing options...
Question
Leic
can someone direct me to a script that does the following
1. if a character reaches 99 it will give a reward
2. total of 100 rewards only on 1st 99 characters
3. if a character leveled to 99 but the count is 101 99 characters, the script will not give reward
Link to comment
Share on other sites
11 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.