The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 1
How to add more custom point rewards
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
kalabasa
Currently the script can only set one custom point i would like to know how to set/add more
OnInit: // 1 = item reward // 2 = variable/cashpoints reward // If you want to set item and variable/cashpoints rewards, do 1|2. // If you only want 1, just choose between 1 or 2 $event_options = 1|2; setarray $event_item_reward, 501, 10, 502, 5; $event_var$ = "#EVENTVARIABLE"; $event_var_name$ = "Custom Points"; $event_var_gain = 1; $event_item_arr = getarraysize($event_item_reward); if ( $event_options&1 ) { for ( .@j = 0; .@j < $event_item_arr; .@j += 2 ) getitem $event_item_reward[.@j], $event_item_reward[.@j+1]; } if ( $event_options&2 ) { setd $event_var$, getd($event_var$)+$event_var_gain; dispbottom "You gained "+$event_var_gain+" "+$event_var_name$+". You now have "+getd($event_var$)+" "+$event_var_name$+".";
Link to comment
Share on other sites
7 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.