Jump to content
  • 0

all in one npc


xmaniacx

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

does anybody have a script where a job master, rental, reset and a platinum skills are combined...... just that one... oh if ur trying to redirect me to the eathena the one who createad multi npc... please dont coz ive already tried that one and i dunno how to modify the script to what i only want its so long and so hard to understand i want a simple script ... thank you in advanced!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  01/25/12
  • Last Seen:  

prontera,155,93,4 script All in One NPC 100,{
mes "[All in One NPC]";
mes "Please select:";
next;
switch(select("Job Master:Rental:Reset:Platinum Skills")) {
 case 1:
  callfunc "jobmaster";
  break;
 case 2:
  callfunc "rental";
  break;
 case 3:
  callfunc "reset";
  break;
 case 4:
  callfunc "platinum";
  break;
}
}
function script jobmaster {
mes "^ff0000[All in One NPC]^000000";
if(Class >= Job_Rune_Knight) goto L_noReq;

if(SkillPoint != 0)
{
 mes "I'm sorry, please use up all your skill points before changing jobs";
 mes "Please come again soon!";
 close;
}

if(JobLevel < 10) goto L_LvError;
switch(Class){
case Job_Novice_High:
case Job_Baby:
case Job_Novice:
 skill 142,1,0;
 skill 143,1,0;
 mes "Welcome, please select the job you wish to change into";
 if(lastJob != 0 && Class == Job_Novice_High){
  switch(lastJob){
  case Job_Knight:
  case Job_Crusader:
set @target_job, Job_Swordman_High;
break;
  case Job_Monk:
  case Job_Priest:
set @target_job, Job_Acolyte_High;
break;
  case Job_Alchemist:
  case Job_Blacksmith:
set @target_job, Job_Merchant_High;
break;
  case Job_Rogue:
  case Job_Assassin:
set @target_job, Job_Thief_High;
break;
  case Job_Wizard:
  case Job_Sage:
set @target_job, Job_Mage_High;
break;
  case Job_Hunter:
  case Job_Bard:
  case Job_Dancer:
set @target_job, Job_Archer_High;
break;
  }
 } else {
  switch(select("Swordsman","Mage","Archer","Acolyte","Merchant","Thief",
  "Super Novice","Taekwon","Gunslinger","Ninja")){
  case 7:
if(Class == Job_Novice_High) goto L_noReq;
if($@JC_SupNovM > BaseLevel) goto L_BvError;
if(Upper == 2)
set @target_job, Job_Super_Baby;
else
set @target_job, Job_SuperNovice;
break;
  case 8:
if(Class == Job_Novice_High) goto L_noReq;
if(Upper == 2) goto L_noReq;
set @target_job, Job_Taekwon;
break;
  case 9:
  case 10:
if(Class == Job_Novice_High || Upper == 2) goto L_noReq;
set @target_job, @menu + 15;
break;
  default:
set @target_job, @menu;
if(Class == Job_Novice_High) set @target_job, @target_job + 4001;
break;
  }
 }
 mes "Are you sure you want to change to " + JobName(@target_job) + "?";
 if(select("Yes","No") == 1){
  callfunc "Job_Change", @target_job;
  if(@target_job == Job_Gunslinger || @target_job == Job_Ninja || @target_job == Job_Taekwon) {
callfunc "F_ClearJobVar";
  } else {
if($@JC_Plat) goto L_GivePlat;
  }
 }
 close;
 break;
default:
 if(JobLevel < $@JC_MinimumJB) goto L_LvError;
 deletearray @job_opt, getarraysize(@job_opt);
 if(Class < Job_Knight || Class == Job_Taekwon || (Class > Job_Baby && Class < Job_Baby_Knight) || (Class > Job_Novice_High && Class < Job_Lord_Knight)){
  if(lastJob != 0 && Class >= Job_Swordman_High){ // lastJob could have been set before changing back to non-trans
set @target_job, lastJob + 4001;
  } else {
switch(Class){
case Job_Swordman_High:
case Job_Baby_Swordman:
case Job_Swordman:
 set @job_opt[0], Job_Knight;
 set @job_opt[1], Job_Crusader;
 break;
case Job_Mage_High:
case Job_Baby_Mage:
case Job_Mage:
 set @job_opt[0], Job_Wizard;
 set @job_opt[1], Job_Sage;
 break;
case Job_Archer_High:
case Job_Baby_Archer:
case Job_Archer:
 set @job_opt[0], Job_Hunter;
 if(Sex == 0)
 set @job_opt[1], Job_Dancer;
 else
 set @job_opt[1], Job_Bard;
 break;
case Job_Acolyte_High:
case Job_Baby_Acolyte:
case Job_Acolyte:
 set @job_opt[0], Job_Priest;
 set @job_opt[1], Job_Monk;
 break;
case Job_Merchant_High:
case Job_Baby_Merchant:
case Job_Merchant:
 set @job_opt[0], Job_Blacksmith;
 set @job_opt[1], Job_Alchemist;
 break;
case Job_Thief_High:
case Job_Baby_Thief:
case Job_Thief:
 set @job_opt[0], Job_Assassin;
 set @job_opt[1], Job_Rogue;
 break;
default:
 set @job_opt[0], Job_Star_Gladiator;
 set @job_opt[1], Job_Soul_Linker;
 break;
}
mes "Welcome, please select the job you wish to change into";
set @target_job, @job_opt[select(JobName(@job_opt[0]), JobName(@job_opt[1]))-1];
if(Class > Job_Novice_High && Class < Job_Lord_Knight) set @target_job, @target_job + 4001;
  }
  mes "Are you sure you want to change to " + JobName(@target_job) + "?";
  if(select("Yes","No")==1){
callfunc "Job_Change", @target_job;
if(@target_job == Job_Star_Gladiator || @target_job == Job_Soul_Linker) {
 callfunc "F_ClearJobVar";
} else {
 if($@JC_Plat) goto L_GivePlat;
}
  }
  close;
 }

 if(BaseLevel < 99 || JobLevel < 50) goto L_cantCh;
 if(checkfalcon() || checkcart() || checkriding()) goto L_remove;

 if((Class >= Job_Knight) && (Class <= Job_Crusader2)){
  mes "Would you like to be reborn or change to 3rd class?";
  switch(select("I want to be reborn!", "I want to change to 3rd class!", "Cancel"))
  {
  case 1:
mes "Are you sure you want to be reborn?";
if(select("Yes", "No")==1){
 set lastJob, Class;
 if(Class == Job_Knight2){
  set lastJob, Job_Knight;
 } else {
  if(Class == Job_Crusader2){
   set lastJob, Job_Crusader;
  }
 }
 jobchange Job_Novice_High;
 resetlvl(1);
 skill 142,1,0;
 skill 143,1,0;
}
break;
  case 2:
goto L_Third;
  }
  close;
 }
 if (Class >= Job_Lord_Knight && Class <= Job_Paladin2)
 {
  if(JobLevel < 50) goto L_cantCh;
  goto L_Third;
 }
}
mes "I'm sorry, there are no further classes for your job.";
close;
L_Third:
set @target_job, roclass(eaclass() | EAJL_THIRD);
mes "Are you sure you want to change to " + JobName(@target_job) + "?";
if(select("Yes", "No")==1){
 callfunc "Job_Change", @target_job;
}
close;
L_GivePlat:
if (BaseClass==Job_SuperNovice) goto L_sSuperN;
if (BaseClass==Job_Swordman) goto L_sSword;
if (BaseClass==Job_Mage) goto L_sMage;
if (BaseClass==Job_Archer) goto L_sArcher;
if (BaseClass==Job_Acolyte) goto L_sAcolyte;
if (BaseClass==Job_Merchant) goto L_sMerchant;
if (BaseClass==Job_Thief) goto L_sThief;
close;
L_sSuperN:
skill 142,1,0;
close;
L_sSword:
skill 142,1,0;
skill 144,1,0;
skill 145,1,0;
skill 146,1,0;
close;
L_sMage:
skill 142,1,0;
skill 157,1,0;
close;
L_sArcher:
skill 142,1,0;
skill 147,1,0;
skill 148,1,0;
close;
L_sAcolyte:
skill 142,1,0;
skill 156,1,0;
close;
L_sMerchant:
skill 142,1,0;
skill 153,1,0;
skill 154,1,0;
skill 155,1,0;
close;
L_sThief:
skill 142,1,0;
skill 149,1,0;
skill 150,1,0;
skill 151,1,0;
skill 152,1,0;
close;
L_cantCh:
mes "I'm sorry, you do not meet the requirements to change";
mes "Please come again soon!";
close;
L_LvError:
mes "I'm sorry, you do not seem to have enough Job Levels";
mes "Please come again soon!";
close;
L_BvError:
mes "I'm sorry, you do not seem to have enough Base Levels";
mes "Please come again soon!";
close;
L_noReq:
mes "I'm sorry, you do not meet the requirements to change";
mes "Please come again soon!";
close;
L_remove:
mes "Please remove your cart,falcon or peco";
mes "Please come again soon!";
close;
OnInit:
// Variable Setup
set $@JC_MinimumJB, 40; //Minimum job level for changing to 2nd classes (Default : 40)
set $@JC_Plat, 1; //Give Platinum skills on Jobchange (Default : 1-yes)
set $@JC_SupNovM, 45; //Base Level to change into Super Novice (Default : 45)
end;
}
function script rental {
mes "[All in One NPC]";
mes "Hi, here you can rent Carts, Falcons or Pecopecos.";
next;
switch(select("Cart:Falcon:Peco")) {
case 1:
 if((BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) && checkcart() == 0 && getskilllv("MC_PUSHCART")>0) {
  setcart;
  close;
 } else {
  mes "[All in One NPC]";
  mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill.";
  close;
 }
case 2:
 if(BaseJob != Job_Archer && BaseClass == Job_Archer && checkfalcon() == 0 && getskilllv("HT_FALCON")>0) {
  setfalcon;
  close;
 } else {
  mes "[All in One NPC]";
  mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill.";
  close;
 }
case 3:
 if (BaseJob != Job_Swordman && BaseClass == Job_Swordman && checkriding() == 0 && getskilllv("KN_RIDING")>0) {
  setriding;
  close;
 } else {
  mes "[All in One NPC]";
  mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill.";
  close;
 }
}
}

function script reset {
set .rskill,5000; // Set value in zeny for skill reset here
set .rstat,5000; // Set value in zeny for stat reset here
set .rboth,9000; // Set value for "package deal" (i.e.: reseting both) here.
mes "[All in One NPC]";
mes "I am a All in One NPC.";
mes "Reset Stats: "+ .rstat +"z";
mes "Reset Skills: "+ .rskill +"z";
mes "Reset Both: "+ .rboth +"z";
mes "Please select the service you want:";
next;
switch(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Quit")) {
case 1:
 mes "[All in One NPC]";
 if (Zeny < .rskill) {
  mes "Sorry, you don't have enough Zeny.";
  close;
 }
 mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
 set Zeny,Zeny-.rskill;
 ResetSkill;
 close;
case 2:
 mes "[All in One NPC]";
 if (Zeny < .rstat) {
  mes "Sorry, you don't have enough Zeny.";
  close;
 }
 mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
 set Zeny,Zeny-.rstat;
 ResetStatus;
 close;
case 3:
 mes "[All in One NPC]";
 if (Zeny < .rboth) {
  mes "Sorry, you don't have enough Zeny.";
  close;
 }
 mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!";
 set Zeny,Zeny-.rboth;
 ResetSkill;
 ResetStatus;
 close;
case 4:
 mes "Come again soon!";
 close;
}
}
function script platinum {
mes "[All in One NPC]";
mes "I can give you the special skills available to your job.";
mes "Would you like these skills now?";
next;
if (select("Yes Please:No thanks") == 2) {
 mes "[All in One NPC]";
 mes "Have a nice day... >.>";
 close;
}
skill 142,1,0; // First Aid
if (BaseClass == Job_Novice) {
 skill 143,1,0; // Play Dead
} else if (BaseClass == Job_Swordman) {
 skill 144,1,0; // Moving HP-Recovery
 skill 145,1,0; // Fatal Blow
 skill 146,1,0; // Auto Berserk
} else if (BaseClass == Job_Mage) {
 skill 157,1,0; // Energy Coat
} else if (BaseClass == Job_Archer) {
 skill 147,1,0; // Arrow Crafting
 skill 148,1,0; // Arrow Repel
} else if (BaseClass == Job_Merchant) {
 skill 153,1,0; // Cart Revolution
 skill 154,1,0; // Change Cart
 skill 155,1,0; // Crazy Uproar
} else if (BaseClass == Job_Thief) {
 skill 149,1,0; // Sand Attack
 skill 150,1,0; // Back Slide
 skill 151,1,0; // Find Stone
 skill 152,1,0; // Stone Fling
} else if (BaseClass == Job_Acolyte) {
 skill 156,1,0; // Holy Light
}
if (Class == Job_Knight || Class == Job_Lord_Knight) {
 skill 1001,1,0; // Charge Attack
} else if (Class == Job_Crusader || Class == Job_Paladin) {
 skill 1002,1,0; // Shrink
} else if (Class == Job_Wizard || Class == Job_High_Wizard) {
 skill 1006,1,0; // Sight Blaster
} else if (Class == Job_Sage || Class == Job_Professor) {
 skill 1007,1,0; // Create Elemental Converter
 skill 1008,1,0; // Elemental Change Water
 skill 1017,1,0; // Elemental Change Earth
 skill 1018,1,0; // Elemental Change Fire
 skill 1019,1,0; // Elemental Change Wind
} else if (Class == Job_Hunter || Class == Job_Sniper) {
 skill 1009,1,0; // Phantasmic Arrow
} else if (Class == Job_Bard || Class == Job_Clown) {
 skill 1010,1,0; // Pang Voice
} else if (Class == Job_Dancer || Class == Job_Gypsy) {
 skill 1011,1,0; // Wink of Charm
} else if (Class == Job_Blacksmith || Class == Job_Whitesmith) {
 skill 1012,1,0; // Unfair Trick
 skill 1013,1,0; // Greed
} else if (Class == Job_Alchemist || Class == Job_Creator) {
 skill 238,1,0; // Bioethics
} else if (Class == Job_Assassin || Class == Job_Assassin_Cross) {
 skill 1003,1,0; // Sonic Acceleration
 skill 1004,1,0; // Throw Venom Knife
} else if (Class == Job_Rogue || Class == Job_Stalker) {
 skill 1005,1,0; // Close Confine
} else if (Class == Job_Priest || Class == Job_High_Priest) {
 skill 1014,1,0; // Redemptio
} else if (Class == Job_Monk || Class == Job_Champion) {
 skill 1015,1,0; // Ki Translation
 skill 1016,1,0; // Ki Explosion
}
mes "[All in One NPC]";
mes "There you go!";
close;
}

Here you go, btw i just copy pasted the actual jobmaster, rental, reset, platinum from the customs rAthena and made it into a function :o

Edited by deathscythe13
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Use a Codebox next time please.

Link to comment
Share on other sites

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.

×
×
  • Create New...