[Release]new Command

Newbie Spellweaver
Joined
Aug 6, 2008
Messages
7
Reaction score
0
This is my First Release So it might not be GOOD.
This is for My new server powerstory it will be up soon with new things
} else if (splitted[0].equals("@access")) {
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 PowerStory.");
} if (splitted[1].equals("shops")) {
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);
}

ill be releasing new commands if you like THIS ONE.if you dont then i wont release anything
Thank you have a Good day
 
Last edited:
this might work, coz people got different npcs......
 
he forgot a few }s
and using else if is preferred.

Nops.

this means to be used like..

@access

-Shows Info-

@access job

-Conversation With Nana-

And yeah, else if is a lot better, but, since there would'nt be any "confusion" in the code, so, it's ok like that.
But now, he can't add "You're using a wrong syntasis" mensage, he would need to put "if(!slippited[1].equals("job") && slippited[1].equals("shop")..." and so on, to make it because the lack of the else if =)

Or place a variable and check the value, which is pointless, just add the else if in that case Oo
 
YEAH!!

my bad XD

you can't close the splitted 0.. you have to remaind it open with the [1]'s

Only the @access would works.



EDIT: I'm still bored.

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);
}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.");
}
}

Edit2: I guess with the comment at the end is better.
 
no coding experience..
So if you ask a noob to do this can he do it?


LOL, no offense to the other guy, but TheifMS just owned you.

TheifMs - [Release]new Command - RaGEZONE Forums


-Ashur
 
actually indirectly this just opens a npc , just like xerixe's @opennpc, sigh, but ok il give you a cookie because of the "access" thing. heh goodluck
 
To make it work better you can add in a check for the splitted length. Example :
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 < 1) {[/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.");
}
}
But } else { alone for that line works too.
 
Back