Jump to content
  • 0

Question

Posted
prontera,158,190,4	script	+ / - Skillpoint	904,{
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "Hello! I can sell you skill points";
		mes "And take away your extra skill points aswell";
		next;
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "What do you want to do now?";
		next;
set .buy,100000;
set .sell,50000;
switch(select("Buy Skillpoints!:Deduct Skill Points")){
	case 1:
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "How many skill points you want to buy?";
		input @amt,0,Zeny/.buy;
		if( @amt == 0 ) close;
		next;
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "There you go!";
		set SkillPoint,SkillPoint + @amt;
		set Zeny, Zeny - ( @amt * .buy );
		close;
	case 2:
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "How many skill points you want to deduct?";
		input @amt,0,SkillPoint;
		if( @amt == 0 ) close;
		next;
		mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
		mes "There you go!";
		set SkillPoint,SkillPoint - @amt;
		set Zeny, Zeny + ( @amt * .sell );
		close;
	
	}
}

the deduct part pls can you make it like this

vsnxg0.jpg

7 answers to this question

Recommended Posts

Posted


prontera,158,190,4 script + / - Skillpoint 904,{

set .buy,100000;

set .sell,50000;

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "Hello! I can sell you skill points";

mes "And take away your extra skill points aswell";

next;

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "What do you want to do now?";

next;

switch(select("Buy Skillpoints!:Deduct Skill Points")){

case 1:

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "How many skill points you want to buy?";

input @amt,0,Zeny/.buy;

if( @amt == 0 ) close;

next;

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "There you go!";

set SkillPoint,SkillPoint + @amt;

set Zeny, Zeny - ( @amt * .buy );

close;

case 2:

if (SkillPoint < 1) {

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "Sorry, you don't have any Skill Point to complete this transaction.";

close;

}

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "Do you want me to take away all your extra skill points?";

menu "Yes",-,"No",Nope;

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "There you go!";

set SkillPoint,0;

set Zeny,Zeny+.sell;

close;

Nope:

mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";

mes "Thank you for using my service.";

close;

}

}

Posted

anakid can you pls edit if your a novice you can buy skill point will appear a mes like this

[ Buy / Deduct Skillpoints ]

mes "I'm afraid I am not allowed to help you, young adventurer. You should do it on your own.";

anakid can you edit too the buy system coz if i buy 100 skillpoints and i only have 1m he will give me 10skill points i want to make it like this if i buy 100 and i dont have the money he will said

mes "I'm sorry you don't have enough money for that...";

 

ty ty



.



any one.

Posted

Add a check if a character that will talk to the npc is a novice. Anyway too lazy to read Anakid codes and modify it. You can do this i guess.

if (!Class) {
    mes "[ ^ff0000Buy / Deduct Skillpoints^000000 ]";
    mes "I'm afraid I am not allowed to help you, young adventurer. You should do it on your own.";
}

For zeny check :

if ( Zeny < ( @amt * .buy ) )
    mes "I'm sorry you don't have enough money for that...";

 

Goodluck! /no1

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