kalabasa Posted January 23, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted January 23, 2021 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$+"."; Quote Link to comment Share on other sites More sharing options...
1 Gerzzie Posted January 23, 2021 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 137 Reputation: 48 Joined: 06/18/12 Last Seen: 16 hours ago Share Posted January 23, 2021 This event script is from Mabuhay. I just modified it for additional- Event Cash Variable 1 - Event Cash Variable 2 - Event Cash Variable 3 I added also @checkpoints to check your remaining Event Cash Variable if you want to remove Event Cash Variable 3 just Remove or Put // ://setd $event_var3$, getd($event_var3$)+$event_var_gain3;Remove or Put // ://dispbottom "You gained "+$event_var_gain3+" "+$event_var_name3$+". You now have "+getd($event_var3$)+" "+$event_var_name3$+"."; Remove or Put // ://dispbottom "You currently have " +$event_var_gain3+ " Event Cash Variable 3"; Credits to @Mabuhay for his Event Script. Modified Mabuhay Event.txt 1 Quote Link to comment Share on other sites More sharing options...
2 crazyarashi Posted January 24, 2021 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 18 hours ago Share Posted January 24, 2021 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; setarray $event_var$,"EVENTVARIABLE1","EVENTVARIABLE2"; setarray $event_var_name$,"Custom Points 1","EVENT VARIABLE2"; setarray $event_var_gain,1,3; $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 ) { for(.@i = 0; .@i < getarraysize($event_var$); .@i++){ .@v = getd("#" + $event_var$[.@i]) + $event_var_gain[.@i]; setd getd("#" + $event_var$[.@i]),.@v; dispbottom "You gained "+$event_var_gain[.@i]+" "+$event_var_name$[.@i]+". You now have "+getd("#" + $event_var$[.@i])+" "+$event_var_name$[.@i]+"."; } 1 Quote Link to comment Share on other sites More sharing options...
0 Sallycantdance Posted January 23, 2021 Group: Members Topic Count: 225 Topics Per Day: 0.14 Content Count: 798 Reputation: 12 Joined: 12/04/20 Last Seen: 3 hours ago Share Posted January 23, 2021 28 minutes ago, kalabasa said: 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$+"."; maybe this one can help you //===== rAthena Script ======================================= //= Cash Shop NPCs //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Sell Cash shop items. //= Based on iRO's Cash shop. Headgears omitted. //===== Additional Comments: ================================= //= 1.0 First Version. Sample shop per-say. //= 1.1 FIxed typo. (bugreport:1078) [L0ne_W0lf] //============================================================ // Payon //============================================================ // Sells: // Battle Manual Box, Life Insurance Box, Bubble Gum Box, // Kafra Card Box, Giant Fly Wing Box, Neuralizer Box, // Token of Ziegfried Box, Enriched Oridecon and Elunium, // Assumpito, Wind Walk, Aspersio, Adreniline Rush, // Blessing and Increase Agility Scroll boxes, Dungeon // Teleport Scroll Box, Stat Food boxes, and Gym Passes. prontera,89,63,4 cashshop Kafra Shop Employee 116,12900:1000,12901:200,12902:1000,12909:100,12910:100,12911:1500,12922:150,7619:100,7620:100,12916:150,12917:150,12915:100,12918:100,12913:125,12914:125,13553:50,12903:100,12904:100,12905:100,12906:100,12907:100,12908:100,7776:50 Quote Link to comment Share on other sites More sharing options...
0 kalabasa Posted January 23, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Author Share Posted January 23, 2021 Just now, chadness said: maybe this one can help you //===== rAthena Script ======================================= //= Cash Shop NPCs //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Sell Cash shop items. //= Based on iRO's Cash shop. Headgears omitted. //===== Additional Comments: ================================= //= 1.0 First Version. Sample shop per-say. //= 1.1 FIxed typo. (bugreport:1078) [L0ne_W0lf] //============================================================ // Payon //============================================================ // Sells: // Battle Manual Box, Life Insurance Box, Bubble Gum Box, // Kafra Card Box, Giant Fly Wing Box, Neuralizer Box, // Token of Ziegfried Box, Enriched Oridecon and Elunium, // Assumpito, Wind Walk, Aspersio, Adreniline Rush, // Blessing and Increase Agility Scroll boxes, Dungeon // Teleport Scroll Box, Stat Food boxes, and Gym Passes. prontera,89,63,4 cashshop Kafra Shop Employee 116,12900:1000,12901:200,12902:1000,12909:100,12910:100,12911:1500,12922:150,7619:100,7620:100,12916:150,12917:150,12915:100,12918:100,12913:125,12914:125,13553:50,12903:100,12904:100,12905:100,12906:100,12907:100,12908:100,7776:50 oh! sorry for the misunderstood this is a event script Quote Link to comment Share on other sites More sharing options...
0 Sallycantdance Posted January 23, 2021 Group: Members Topic Count: 225 Topics Per Day: 0.14 Content Count: 798 Reputation: 12 Joined: 12/04/20 Last Seen: 3 hours ago Share Posted January 23, 2021 20 minutes ago, kalabasa said: oh! sorry for the misunderstood this is a event script sorry Quote Link to comment Share on other sites More sharing options...
0 kalabasa Posted January 24, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Author Share Posted January 24, 2021 yea i forgot credits thanks working fine Quote Link to comment Share on other sites More sharing options...
0 kalabasa Posted January 28, 2021 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Author Share Posted January 28, 2021 On 1/24/2021 at 10:29 AM, crazyarashi said: 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; setarray $event_var$,"EVENTVARIABLE1","EVENTVARIABLE2"; setarray $event_var_name$,"Custom Points 1","EVENT VARIABLE2"; setarray $event_var_gain,1,3; $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 ) { for(.@i = 0; .@i < getarraysize($event_var$); .@i++){ .@v = getd("#" + $event_var$[.@i]) + $event_var_gain[.@i]; setd getd("#" + $event_var$[.@i]),.@v; dispbottom "You gained "+$event_var_gain[.@i]+" "+$event_var_name$[.@i]+". You now have "+getd("#" + $event_var$[.@i])+" "+$event_var_name$[.@i]+"."; } thanks! will try this also Quote Link to comment Share on other sites More sharing options...
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.