Jump to content
  • 0

Question

Posted

Hi good day guys, i just want to request a Skill seller NPC that will asked you to pay for zeny each skill points.

 

Also the NPC only sells skill points for trans job and up only, not for novice. thank you so much ? 

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

This should do it.

 

Modify settings on the "OnInit:" section to make permanent changes, otherwise GMs over gm lvl 60 can modify the settings live, but these aren't permanent changes and will only last till the script is reloaded again.

prontera,155,186,4	script	Skillpoint Trader#pront	4W_M_01,{

	.name$ = "[^FF0000 Skillpoint Trader ^000000]";

	if(getgmlevel() > .minGM){
		mes .name$;
		mes "Hi GM "+strcharinfo(0)+"!";
		switch(select("~ Change Settings:~ Show player menu:~ ^FF0000Cancel^000000")){
			case 1:
				while(1){
					clear;
					mes .name$;
					mes "Zeny per point: ^57b017"+callfunc("F_InsertComma",.zeny)+"^000000";
					mes "Trans classes only: "+(.onlytrans ? "^57b017Enabled^000000":"^8b8b8bDisabled^000000");
					mes "Level required: "+(.minlvl ? "^57b017"+.minlvl+"^000000":"^8b8b8bDisabled^000000");
					mes "This changes will only last until the next restart/reloadscript. Recommend changing in the script for permanent changes.";
					switch(select("~ Set Zeny:~ Set Trans Restriction:~ Set Lvl Restriction:~ ^FF0000Cancel^000000")){
						case 1: input .zeny; break;
						case 2: if(.onlytrans == 1){.onlytrans=0;}else{.onlytrans=1;} break;
						case 3: clear; mes .name$; mes "Input level required to sell points. 0 to disable"; input .minlvl; break;
						default: close;
					}
				}
			case 2: clear; break;
			default: close;
		}
	}

	mes .name$;
	mes "Hi "+strcharinfo(0)+", I can buy your spare skill points for zeny!";
	mes "----";
	mes "Current Exchange Rate:";
	mes "1pt = ^d19a24"+callfunc("F_InsertComma",.zeny)+"^000000z";
	switch(select("~ Sell Skill Points:~ ^FF0000Cancel^000000")){
		case 1:
			break;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}
	if(BaseLevel < .minlvl){
		clear;
		mes .name$;
		mes "You are too low level to use this feature, please speak to me once you've hit level "+.minlvl;
		close;
	}
	if(.onlytrans){ 
		if(Class >= 4008 && Class <= 4022){
			goto L_SELL;
				} else if(Class >= 4054 && Class <= 4087){
					goto L_SELL;
					} else { 
						clear; 
						mes .name$;
						mes "Only Transcendence classes can use this feature!";
						close;
					}
	}
L_SELL:
	clear;
	mes .name$;
	mes "You have "+SkillPoint+" skill points available!";
	switch(select("~ Sell One:~ Sell Multiple:~ Sell All:~ ^FF0000Cancel^000000")){
		case 1:
			.@sellamt = 1; break;
		case 2:
			mes "Please input the amount of skill points you would like to sell.";
			input .@sellamt; 
			if(.@sellamt > SkillPoint) { .@sellamt = SkillPoint; } else if(.@sellamt < 0){ .@sellamt = 1; } break;
		case 3:
			.@sellamt = SkillPoint; break;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}
	clear;
	mes .name$;
	mes "You want to sell ^57b017"+.@sellamt+"^000000 pts for";
	mes "^d19a24"+callfunc("F_InsertComma",(.zeny*.@sellamt))+"^000000z?";
	switch(select("~ Yes:~ ^FF0000Cancel^000000")){
		case 1:
			SkillPoint = SkillPoint - .@sellamt;
			Zeny = Zeny + (.zeny*.@sellamt);
			clear;
			mes .name$;
			mes "I've just credited ^d19a24"+callfunc("F_InsertComma",(.zeny*.@sellamt))+"^000000z into your account!";
			close;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}


OnInit:
	.zeny = 100000;	// change to however many zeny you want per skill point
	.onlytrans = 1;	// change to 0 to allow any class to trade skill points
	.minlvl = 0;	// change to your max level to only allow max level chars to trade points. 0 to disable.
	.minGM = 60;	// change to the minimum GM level required to access the GM settings.
	end;

}

 

Edited by PottScilgrim
  • Love 1
  • 0
Posted
14 hours ago, PottScilgrim said:

This should do it.

 

Modify settings on the "OnInit:" section to make permanent changes, otherwise GMs over gm lvl 60 can modify the settings live, but these aren't permanent changes and will only last till the script is reloaded again.


prontera,155,186,4	script	Skillpoint Trader#pront	4W_M_01,{

	.name$ = "[^FF0000 Skillpoint Trader ^000000]";

	if(getgmlevel() > .minGM){
		mes .name$;
		mes "Hi GM "+strcharinfo(0)+"!";
		switch(select("~ Change Settings:~ Show player menu:~ ^FF0000Cancel^000000")){
			case 1:
				while(1){
					clear;
					mes .name$;
					mes "Zeny per point: ^57b017"+callfunc("F_InsertComma",.zeny)+"^000000";
					mes "Trans classes only: "+(.onlytrans ? "^57b017Enabled^000000":"^8b8b8bDisabled^000000");
					mes "Level required: "+(.minlvl ? "^57b017"+.minlvl+"^000000":"^8b8b8bDisabled^000000");
					mes "This changes will only last until the next restart/reloadscript. Recommend changing in the script for permanent changes.";
					switch(select("~ Set Zeny:~ Set Trans Restriction:~ Set Lvl Restriction:~ ^FF0000Cancel^000000")){
						case 1: input .zeny; break;
						case 2: if(.onlytrans == 1){.onlytrans=0;}else{.onlytrans=1;} break;
						case 3: clear; mes .name$; mes "Input level required to sell points. 0 to disable"; input .minlvl; break;
						default: close;
					}
				}
			case 2: clear; break;
			default: close;
		}
	}

	mes .name$;
	mes "Hi "+strcharinfo(0)+", I can buy your spare skill points for zeny!";
	mes "----";
	mes "Current Exchange Rate:";
	mes "1pt = ^d19a24"+callfunc("F_InsertComma",.zeny)+"^000000z";
	switch(select("~ Sell Skill Points:~ ^FF0000Cancel^000000")){
		case 1:
			break;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}
	if(BaseLevel < .minlvl){
		clear;
		mes .name$;
		mes "You are too low level to use this feature, please speak to me once you've hit level "+.minlvl;
		close;
	}
	if(.onlytrans){ 
		if(Class >= 4008 && Class <= 4022){
			goto L_SELL;
				} else if(Class >= 4054 && Class <= 4087){
					goto L_SELL;
					} else { 
						clear; 
						mes .name$;
						mes "Only Transcendence classes can use this feature!";
						close;
					}
	}
L_SELL:
	clear;
	mes .name$;
	mes "You have "+SkillPoint+" skill points available!";
	switch(select("~ Sell One:~ Sell Multiple:~ Sell All:~ ^FF0000Cancel^000000")){
		case 1:
			.@sellamt = 1; break;
		case 2:
			mes "Please input the amount of skill points you would like to sell.";
			input .@sellamt; 
			if(.@sellamt > SkillPoint) { .@sellamt = SkillPoint; } else if(.@sellamt < 0){ .@sellamt = 1; } break;
		case 3:
			.@sellamt = SkillPoint; break;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}
	clear;
	mes .name$;
	mes "You want to sell ^57b017"+.@sellamt+"^000000 pts for";
	mes "^d19a24"+callfunc("F_InsertComma",(.zeny*.@sellamt))+"^000000z?";
	switch(select("~ Yes:~ ^FF0000Cancel^000000")){
		case 1:
			SkillPoint = SkillPoint - .@sellamt;
			Zeny = Zeny + (.zeny*.@sellamt);
			clear;
			mes .name$;
			mes "I've just credited ^d19a24"+callfunc("F_InsertComma",(.zeny*.@sellamt))+"^000000z into your account!";
			close;
		default:
			clear;
			mes .name$;
			emotion ET_BEST;
			mes "Ok, see you next time!";
			close;
	}


OnInit:
	.zeny = 100000;	// change to however many zeny you want per skill point
	.onlytrans = 1;	// change to 0 to allow any class to trade skill points
	.minlvl = 0;	// change to your max level to only allow max level chars to trade points. 0 to disable.
	.minGM = 60;	// change to the minimum GM level required to access the GM settings.
	end;

}

 

Thank you so much for the help my dear ?

  • 0
Posted
2 hours ago, PottScilgrim said:

Big yikes. That’s what I get for quick scripting! I’ll fix it soon.

No Problem i already fixed the functions and its work perfectly thank you ? 

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