Jump to content
  • 0

Add Stats and Add Skill NPC


Question

17 answers to this question

Recommended Posts

Posted

Try this code...

prontera,155,181,5 script Sample 436,{
set .BuyCost,10;
set .Point,10;
switch(select("Buy Skill Points:Buy Stat Points")){
Case 1:
mes "How many Skill Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount * .BuyCost ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Skill Points.";
set SkillPoint,SkillPoint + (@Amount * .Point);
delitem 7179,@Amount * .BuyCost;
close;
Case 2:
mes "How many Stat Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount * .BuyCost){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Stat Points.";
set StatusPoint,StatusPoint + (@Amount * .Point);
delitem 7179,@Amount * .BuyCost;
close;
}
}

So you'll just need to edit the value of .Point..:(

Posted

Try this.. it's working fine with me... It's set to 1 pod = 1 stat/skill

prontera,155,181,5 script Seller 436,{
set .BuyCost,1;
switch(select("Buy Skill Points:Buy Stat Points")){
Case 1:
mes "How many Skill Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
next;
mes "Gained "+@Amount+" Skill Points.";
set SkillPoint,SkillPoint + @Amount;
delitem 7179,@Amount;
close;
Case 2:
mes "How many Stat Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
next;
mes "Gained "+@Amount+" Stat Points.";
set StatusPoint,StatusPoint + @Amount;
delitem 7179,@Amount;
close;
}
}

Posted

you should have add

if( countitem( 7179 ) < @Amount ){
mes "Not Enough POD";
close;
}

your script will return ERROR when they input a number that is large than their current POD amount.

or another way...

input @Amount,0,countitem( 7179 );

Posted

you should have add

if( countitem( 7179 ) < @Amount ){
mes "Not Enough POD";
close;
}

your script will return ERROR when they input a number that is large than their current POD amount.

Ohh thanks to that sir Emistry.. /no1 miss that part.. /ok

Posted

It should look like this.. /no1

prontera,155,181,5    script    Sample    436,{
set .BuyCost,1;
switch(select("Buy Skill Points:Buy Stat Points")){
Case 1:
mes "How many Skill Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Skill Points.";
set SkillPoint,SkillPoint + @Amount;
delitem 7179,@Amount;
close;
Case 2:
mes "How many Stat Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Stat Points.";
set StatusPoint,StatusPoint + (@Amount);
delitem 7179,@Amount;
close;
}
}

Posted

its working but i can't change into 10 pods npc exchange 1 pc only.

guild_vs3,51,51,5    script    Skills & Stats Seller    436,{
set .BuyCost,10;
switch(select("Buy Skill Points:Buy Stat Points")){
Case 1:
mes "How many Skill Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Skill Points.";
set SkillPoint,SkillPoint + @Amount;
delitem 7179,@Amount;
close;
Case 2:
mes "How many Stat Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Reunited Donation Ticket";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 30151 ) < @Amount ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Stat Points.";
set StatusPoint,StatusPoint + (@Amount);
delitem 30151,@Amount;
close;
}
}

Posted

here's my script

its working now, but in stats i want to change 1 stats only give npc, i need to change into 10. how to put that 10 stats? thanks

guild_vs3,51,51,5    script    Skills & Stats Seller    436,{
set .BuyCost,10;
switch(select("Buy Skill Points:Buy Stat Points")){
Case 1:
mes "How many Skill Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Pod.";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount * .BuyCost ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Skill Points.";
set SkillPoint,SkillPoint + @Amount;
delitem 7179,@Amount * .BuyCost;
close;
Case 2:
mes "How many Stat Points you want to Buy ?";
mes "Each Cost "+.BuyCost+" Reunited Donation Ticket";
input @Amount,0;
if( @Amount == 0 ) close;
if( countitem( 7179 ) < @Amount * .BuyCost ){
   mes "Not Enough POD";
   close;
}
next;
mes "Gained "+@Amount+" Stat Points.";
set StatusPoint,StatusPoint + (@Amount);
delitem 30151,@Amount * .BuyCost;
close;
}
}

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