• Announcements

    • Emistry

      Rules and Regulations - General/Script/Database/Source Support   11/16/2016

      In all sub-forums of this section , you are still bound to follow the rAthena Board Rules. Topic Author: Do not release scripts that are not of your own creation unless you can provide evidence of explicit permission from the original author to do so. Attempt to post your script in the proper section. If you're not certain as to where to post it, feel free to ask one of the Moderators. Do provide an informative title.  Do provide at the very least a 3-4 sentences description or summary that clearly states what your script does. Attempt to have multiple hosts for your scripts as to prevent dead links. 3 or more links are ideal. Links to your issue should directly provide the relevant items without the need for registration.  Make use of BBCode for respective contents.  Mark the reply as "Best Answer" in case it solved your issue. You may as well consider give them a reputation for the help. Vote Up relevant replies, and Vote Down for irrelevant replies. You're not allowed to bump your topics if you're not providing any new updates prior to your previous post.   Member: You're not allowed to bump your topics if you're not providing any new updates prior to your previous post. Do not post anything irrelevant contents in the topic. Vote Up relevant replies, and Vote Down for irrelevant replies. You may only post into this area if you are willing to either write new or make changes to scripting code yourself.  Do not criticize others reply being too general or without concrete scripting code.    Everyone: Violate these rules may result in immediate deletion of the topic/post, warning increase, and restriction of posting abilities for a certain period of time. On future offenses, member is to receive an increase in the warn level and have their posting abilities restricted for a certain period of time to be determined by the Moderators handling the case.
      * rAthena Staff reserves the right to add to and change the rules at any time. It is your duty to keep up with any changes and follow them to the best of your ability.   Your cooperation in this regard will be highly appreciated. Thank you.
  • 0
CyberDevil

Platinum Skills under payment

Question

Hi all,

can you correct this my script to make platinum skills payment? I'm not sure it works 100%... the original script is here: https://github.com/rathena/rathena/blob/master/npc/custom/platinum_skills.txt

prontera,128,200,6	script	Platinum Skill NPC	94,{
	mes "[Platinum Skill NPC]";
	mes "I can give you the special skills available to your job.";
	mes "The total cost is 100.000 zeny,";
	mes "but you can also get them for free by doing the quests!";
	mes "Would you like these skills now, paying?";
	next;
	if (select("Yes Please:No") == 2) {
		mes "[Platinum Skill NPC]";
		mes "Have a nice day... >.>";
		close;
	}
	if( Zeny <100000 ) {
		mes "You need 100.000 zeny.";
		close;
	}
	set Zeny,Zeny -100000;
	callfunc "F_GetPlatinumSkills";
	mes "[Platinum Skill NPC]";
	mes "There you go!";
	close;
}

 

Edited by CyberDevil

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

it seems to work well but how can I not pay if a player has already activated all the platinum skills? Now every time you select "Yes" you still get 100.000z even if you have all the skills!

Share this post


Link to post
Share on other sites
  • 0

add a check

if (getskilllv(152)) // 152 = SKILL ID ... if they already have it, then just have them say mes "Sorry"; close;

 

Thanks,

Z3R0

Share this post


Link to post
Share on other sites
  • 0

create a set script commands and add a conditional statement

example:
 

set "addparameter here"plat,0;

if ($plat == 1)  goto "proceedhere"

"proceed here if not";

set $plat,1;

proceedhere:

mes"you already take plat";

close;

 

 

Share this post


Link to post
Share on other sites
  • 0

no reason to set a needless variable when you can just determine if they have the skills or not

43 minutes ago, Poring King said:

create a set script commands and add a conditional statement

example:
 

set "addparameter here"plat,0;

if ($plat == 1)  goto "proceedhere"

"proceed here if not";

set $plat,1;

proceedhere:

mes"you already take plat";

close;

 

 

 

Share this post


Link to post
Share on other sites
  • 0
10 minutes ago, Z3R0 said:

no reason to set a needless variable when you can just determine if they have the skills or not

 

Yeah i agree. this is another way btw. i wrote a reply and idle for 30 mins so i did not see that there is already reply my bad .

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

ok tnx... I have tested it with the skill id 145 like this:

	if (getskilllv(145)) {
		mes "[Platinum Skill Pusher]";
		mes "Hey buddy, you already have them, do not waste my time!";
		close;
	}

Sorry for my noob question, but how can I insert a multiple control over the other skills according to the class?

This is my test script in progress if you need:
 

harboro1,128,200,6	script	Platinum Skill Pusher	779,{
	mes "[Platinum Skill Pusher]";
	mes "Pssst, ehy you!";
	mes "Hand me ^0000FF100.000 zeny^000000 and you'll avoid a boring training, none will know!";
	mes "Man, there's no refund... are you sure you want it?";
	next;
	if (select("Yes Please:No") == 2) {
		mes "[Platinum Skill Pusher]";
		mes "Have a nice day... dude!";
		close;
	}
	if (getskilllv(145)) {
		mes "[Platinum Skill Pusher]";
		mes "Hey buddy, you already have them, do not waste my time!";
		close;
	}
	if( Zeny <100000 ) {
		mes "...ehy dude, you need ^0000FF100.000 zeny^000000,";
		mes "ask them to mom!";
		close;
	}
	set Zeny,Zeny -100000;
	callfunc "F_GetPlatinumSkills";
	mes "[Platinum Skill Pusher]";
	mes "Dehee thanks man... People lazy like you makes me rich buahah!";
	close;
}

 

Share this post


Link to post
Share on other sites
  • 0
if (Class = X && getskilllv(145) && getskilllv(#)) { mes "sorry"; close; }

There's probably some better ways to do it, but this is a basic way...

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, Z3R0 said:
if (Class = X && getskilllv(145) && getskilllv(#)) { mes "sorry"; close; }

There's probably some better ways to do it, but this is a basic way...

Use a switch(class) then either check in the switch or set skills in the switch and check after it (I would do latter)

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
harboro1,128,200,6	script	Platinum Skill Pusher	779,{
        mes "[Platinum Skill Pusher]";
        mes "Pssst, ehy you!";
        mes "Hand me ^0000FF100.000 zeny^000000 and you'll avoid a boring training, none will know!";
        mes "Man, there's no refund... are you sure you want it?";
        next;
        if (select("Yes Please:No") == 2) {
                mes "[Platinum Skill Pusher]";
                mes "Have a nice day... dude!";
                close;
        }

		switch (Class) {		
	  case Job_Swordman:
		if (JobLevel < 35){
                mes "[Platinum Skill Pusher]";
                mes "Hey Dartagnan, your job level is too low, you must to be minimum Job Level 35 do not waste my time!";
                close;
                }
		if (getskilllv(144) && getskilllv(145) && getskilllv(146)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Swordy, you already have them, do not waste my time!";
                close;
				}
		break;
	   case Job_Mage:
		if (getskilllv(157)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Harry Potter, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Archer:
		if (getskilllv(147) && getskilllv(148)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Robin Hood, you already have them, do not waste my time!";
                close;
				}
		break;
		case Job_Acolyte:
		if (getskilllv(156)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey His Holiness, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Merchant:
		if (getskilllv(153) && getskilllv(154)&& getskilllv(155)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Amazon, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Thief:
		if (getskilllv(149) && getskilllv(150) && getskilllv(151) && getskilllv(152)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Lupin, you already have them, do not waste my time!";
                close;
				}
		break;		
	    case Job_Knight:
		if (getskilllv(1001)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Don Quixote, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Wizard:
		if (getskilllv(1006)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Gandalf, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Hunter:
		if (getskilllv(1009)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Legolas, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Priest:
		if (getskilllv(1014)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Messiah, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Blacksmith:
		if (getskilllv(1012) && getskilllv(1013)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Metal Head, you already have them, do not waste my time!";
                close;
				}
		break;		
	    case Job_Assassin:
		if (getskilllv(1003) && getskilllv(1004)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Fake Ninja, you already have them, do not waste my time!";
                close;
				}
		break;		
		case Job_Crusader:
		if (getskilllv(1002)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Holy Tin Can, you already have them, do not waste my time!";
                close;
				}
		break;
	    case Job_Sage:
		if (getskilllv(1007) && getskilllv(1008) && getskilllv(1017) && getskilllv(1018)&& getskilllv(1019)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Bookworm, you already have them, do not waste my time!";
                close;
				}
		break;		
		case Job_Bard:
		if (getskilllv(1010)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Tom Jones, you already have them, do not waste my time!";
                close;
				}
		break;		
		case Job_Dancer:
		if (getskilllv(1011)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Beyonce, you already have them, do not waste my time!";
                close;
				}
		break;	
		case Job_Monk:
		if (getskilllv(1015)&& getskilllv(1016)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Rocky, you already have them, do not waste my time!";
                close;
				}
		break;		
		case Job_Alchemist:
		if (getskilllv(238)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Heisenberg, you already have them, do not waste my time!";
                close;
				}
		break;	
		case Job_Rogue:
		if (getskilllv(1005)) {
                mes "[Platinum Skill Pusher]";
                mes "Hey Hobo, you already have them, do not waste my time!";
                close;
				}
		break;				
		default:
		break;
        }		    
                if( Zeny <100000 ) {
                        mes "...ehy dude, you need ^0000FF100.000 zeny^000000,";
                        mes "ask them to mom!";
                        close;
                }
                set Zeny,Zeny -100000;
                callfunc "F_GetPlatinumSkills";
                mes "[Platinum Skill Pusher]";
                mes "Dehee thanks man...lazy people like you makes me rich buahah!";
                close;
      
}

It looks like it works but I accept tips to improve it ... NPC is also quite "bastard"! XD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now