Kafrapoints

dfabsgwapings

New member
Messages
165
Points
0
Github
dfabsgwapings
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?

 
use multi currency shop with variable as currency.

Set the variable to #KAFRAPOINTS

 
try to use this (not tested)

Code:
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;
}
 
@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*****

 
@dfabsgwapings

try to use this one

Code:
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;
}
 
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

 
oh yep it's the 

#KAFRAPOINTS -= @price-@points;

i forgot it ^^

 
Back
Top