Author Topic: 508 SpellBook Swap With Altar  (Read 78 times)

Keyani

  • Respect
  • Administrator
  • Newbie
  • ***
  • Posts: 48
  • Thanked +2/-0
  • Location: Belgium
    • View Profile
508 SpellBook Swap With Altar
« on: July 06, 2011, 05:56:46 am »
Base: Palidino, bulby the second one for Codeusa

Place this code in objectoption1.java
u can change the altar id

Btw u still need to add the global object ofc.

Code: [Select]
case 6552: //Ancients altar
p.requestAnim(6299, 0);
p.requestGFX(1062, 0);
if (p.spellbook == 0) {
p.frames.setTab(p, 79, 193); //Ancients
p.spellbook = 1;
p.frames.sendMessage(p, "You feel a strange wisdom fill your mind...");
} else if (p.spellbook == 1) {
p.frames.setTab(p, 79, 192); //Modern
p.spellbook = 0;
p.frames.sendMessage(p, "You feel a strange wisdom empty your mind...");
} else {
p.frames.sendMessage(p, "You must be on Modern or Ancient magicks to switch your spellbook at this altar.");
}
break;
case 28698: //Lunars altar
if (p.spellbook == 0) {
p.frames.setTab(p, 79, 430); //Lunar
p.spellbook = 2;
p.frames.sendMessage(p, "You feel a strange wisdom fill your mind...");
p.requestAnim(6299, 0);
p.requestGFX(1062, 0);
} else if (p.spellbook == 2) {
p.frames.setTab(p, 79, 192); //Modern
p.spellbook = 0;
p.frames.sendMessage(p, "You feel a strange wisdom empty your mind...");
p.requestAnim(6299, 0);
p.requestGFX(1062, 0);
} else {
p.frames.sendMessage(p, "You must be on Modern or Lunar magicks to switch your spellbook at this altar.");
}
break;

Codeusa one

Only got Ancient atm il make lunar later:

Code: [Select]
case 6552:
if (p.spellbook == 430 || p.spellbook == 193) {
p.questStage = 3;
p.message("You convert to Normal Magics.");
p.requestAnim(6299, 0);
p.requestGFX(1062, 0);
p.spellbook = 192;
p.getActionSender().setTab(p, 79, p.spellbook);
} else {
if (p.getLevelForXP(6) < 50) {
p.message("You need 50 magic to convert to Ancients Magicks.");
return;
}
p.spellbook = 193;
p.requestAnim(6299, 0);
p.requestGFX(1062, 0);
p.getActionSender().setTab(p, 79, p.spellbook);
p.message("You convert to Ancients Magic.");
}
break;



Save, compile
« Last Edit: July 06, 2011, 02:46:01 pm by Hayden »

Share on Bluesky Share on Facebook


Hayden

  • Forum Owner
  • Administrator
  • Member
  • ***
  • Posts: 77
  • Thanked +7/-0
    • View Profile
Re: 508 SpellBook Swap Whit Altar
« Reply #1 on: July 06, 2011, 02:45:37 pm »
Great! Thanks for this.