- Joined
- Aug 23, 2008
- Messages
- 230
- Reaction score
- 11
sexy[/sarcasm].....
but still good for other things^^ <43523525534636436 good job
but still good for other things^^ <43523525534636436 good job
} else if (splitted[0].equals("@access")) {
if (splitted[1].equals("shops")) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9030000);
} else if (splitted[1].equals("skillmaxer")) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9201025);
}else if (splitted[1].equals("job")) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9201026);
} else if (splitted[1].equals("storage")) {
c.getPlayer().getStorage().sendStorage(c, 2080005);
}else{
mc.dropMessage("Welcome to [Powerstory's Easy ACCESS System] v1.0");
mc.dropMessage("----------------------------------------------");
mc.dropMessage("[Easy ACCESS] Commands");
mc.dropMessage("@access shops - Allows you to access Fredrick which he shall display all the shops in Powerstory.");
mc.dropMessage("@access skillmaxer - Shows up Nana(L)'s NPC Chat allowing you to max your skills anywhere.");
mc.dropMessage("@access job - Shows up Nana(O)'s NPC Chat allowing you to job advance anywhere anytime.");
mc.dropMessage("@access storage - Allows you to access the storage ANY TIME.");
mc.dropMessage("-----------------------------------------------");
mc.dropMessage("More commands will come soon to SactualMS.");
}
}
To make it work better you can add in a check for the splitted length. Example :But } else { alone for that line works too.Code:} else if (splitted[0].equals("@access")) { if (splitted[1].equals("shops")) { NPCScriptManager npc = NPCScriptManager.getInstance(); npc.start(c, 9030000); } else if (splitted[1].equals("skillmaxer")) { NPCScriptManager npc = NPCScriptManager.getInstance(); npc.start(c, 9201025); } else if (splitted[1].equals("job")) { NPCScriptManager npc = NPCScriptManager.getInstance(); npc.start(c, 9201026); } else if (splitted[1].equals("storage")) { c.getPlayer().getStorage().sendStorage(c, 2080005); [B][U]} else if (splitted.length != 2) {[/U][/B] mc.dropMessage("Welcome to [Powerstory's Easy ACCESS System] v1.0"); mc.dropMessage("----------------------------------------------"); mc.dropMessage("[Easy ACCESS] Commands"); mc.dropMessage("@access shops - Allows you to access Fredrick which he shall display all the shops in Powerstory."); mc.dropMessage("@access skillmaxer - Shows up Nana(L)'s NPC Chat allowing you to max your skills anywhere."); mc.dropMessage("@access job - Shows up Nana(O)'s NPC Chat allowing you to job advance anywhere anytime."); mc.dropMessage("@access storage - Allows you to access the storage ANY TIME."); mc.dropMessage("-----------------------------------------------"); mc.dropMessage("More commands will come soon to SactualMS."); } }
Oh right thanks.splitted.length starts at 1, not 0. Fixed it for you.
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9030000);
} if (splitted[1].equals("skillmaxer")) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9201025);
} if (splitted[1].equals("job")) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(c, 9201026);
} if (splitted[1].equals("storage")) {
c.getPlayer().getStorage().sendStorage(c, 2080005);
npc.start(c, 9201026);