Jump to content
  • 0
Sign in to follow this  
dfabsgwapings

Kafrapoints

Question

Hi everyone

 

How can I use the kafrapoints as a currency to buy an item?

 

like for example

 

To use Cashpoint the NPC shop should be cashshop

To use Zeny the NPC should be shop only

 

How about the kafrapoints what NPC shop should it be?

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

try to use this (not tested)

prontera,100,100,0	trader	Test	1_M_01,{
	OnInit:
	tradertype(NST_CUSTOM);
	sellitem Red_Potion,2;
	end;

OnCountFunds:
	setcurrency(#KAFRAPOINTS);
	end;

OnPayFunds:
	if( #KAFRAPOINTS < @points )
		end;
	#KAFRAPOINTS -= @price-@points;
	purchaseok();
	end;
}

Share this post


Link to post
Share on other sites
  • 0

@Asheraf

 

can you please fix this script? I need this NPC shop to use a #KAFRAPOINTS instead of #CASHPOINTS to buy the items.

 

Thanks...

 

prontera,137,223,5	script	Test	4_F_KAFRA3,{

mes "[Test]";
mes "Please purchase only 1 item at a time to avoid loss of points.";
next;
mes "[Test]";
mes "Please select a category.";
switch(select("Items:Pet Eggs:Headgears")){
	case 1: 
		callshop "vote01",0;
		npcshopattach "vote01";
		end;
	case 2: 
		callshop "vote02",0;
		npcshopattach "vote02";
		end;
	case 3: 
		callshop "vote03",0;
		npcshopattach "vote03";
		end;
		}
	}
	
-	cashshop	vote01	-1,501:10
-	cashshop	vote02	-1,502:10
-	cashshop	vote03	-1,503:10

does anyone know how to do this one?


BUMP*****

Share this post


Link to post
Share on other sites
  • 0

@dfabsgwapings

try to use this one

 

prontera,137,223,5	script	Test	4_F_KAFRA3,{

	mes "[Test]";
	mes "Please purchase only 1 item at a time to avoid loss of points.";
	next;
	mes "[Test]";
	mes "Please select a category.";
	switch(select("Items:Pet Eggs:Headgears")){
		case 1: 
			openshop("vote01");
			end;
		case 2: 
			openshop("vote02");
			end;
		case 3: 
			openshop("vote03");
			end;
	}
}

-	trader	vote01	1_M_01,{
	OnInit:
	tradertype(NST_CUSTOM);
	sellitem Red_Potion,2;
	end;

OnCountFunds:
	setcurrency(#KAFRAPOINTS);
	end;

OnPayFunds:
	if( #KAFRAPOINTS < @points )
		end;
	#KAFRAPOINTS -= @points;
	purchaseok();
	end;
}

-	trader	vote02	1_M_01,{
	OnInit:
	tradertype(NST_CUSTOM);
	sellitem Red_Potion,2;
	end;

OnCountFunds:
	setcurrency(#KAFRAPOINTS);
	end;

OnPayFunds:
	if( #KAFRAPOINTS < @points )
		end;
	#KAFRAPOINTS -= @points;
	purchaseok();
	end;
}

-	trader	vote03	1_M_01,{
	OnInit:
	tradertype(NST_CUSTOM);
	sellitem Red_Potion,2;
	end;

OnCountFunds:
	setcurrency(#KAFRAPOINTS);
	end;

OnPayFunds:
	if( #KAFRAPOINTS < @points )
		end;
	#KAFRAPOINTS -= @points;
	purchaseok();
	end;
}

Share this post


Link to post
Share on other sites
  • 0

thank you sir, however there is something wrong. when i buy an item i can get the item however the points is not being deducted


NVM. i found the cause and was able to fix it. anyways thanks for the help @Asheraf

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.