Jump to content
  • 0
Sign in to follow this  
Krakens

Command to change Spellbook at will? Not PI

Question

[B]The source I downloaded DecietfulPK ancient alter doesn't give you the different spell books when you click the dialogue so trying to just have a command that anyone can use whenever except for when in the wildy.

Some examples of my server commands, hopefully it helps you come up with the code. [/B]


case "changepassword":
try {
String password = playerCommand.substring(15);
if (password.length() < 4) {
c.sendMessage("Your password needs to be bigger than 3 characters.");
return;
}
c.playerPass = password;
c.sendMessage("Your password is now: " + password);
} catch (Exception e) {
c.sendMessage("You must enter a password.");
}
return;





if (cmd.startsWith("rep")) {
if (c.reputationPoints >= 1000) {
c.forcedChat("I have "+c.reputationPoints+" reputation points, so you can **** off.");
} else
c.forcedChat("I currently have "+c.reputationPoints+" reputation point(s).");
}




if(cmd.startsWith("unpc")) {
c.isNpc = false;
c.updateRequired = true;
c.appearanceUpdateRequired = true;
}

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Nobody knows?

Share this post


Link to post
Share on other sites
  • 0
add this snippet
[url]http://www.runelocus.com/forums/showthread.php?103601-PI-Efficient-Spellbook-switching[/url]

command >

[code]if (cmd.startsWith("ancients")) {
if (c.inWild())
return;
c.setSpellbook(Spellbook.ANCIENT);
}[/code]

You probably understand how to add the rest.

Share this post


Link to post
Share on other sites
  • 0
I tried it and it doesn't come up in compiler right.

Share this post


Link to post
Share on other sites
  • 0
Can you help me add the snippet? Team Viewer?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×