Jump to content
  • 1

How to add more custom point rewards


Question

Posted

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$+".";

 

7 answers to this question

Recommended Posts

  • 1
Posted

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

  • Upvote 1
  • 2
Posted
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]+".";
        	}
		

 

  • Upvote 1
  • 0
Posted
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
 

  • 0
Posted
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

  • 0
Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...