Fixed rebirth system not working.
This commit is contained in:
@@ -1,15 +1,8 @@
|
|||||||
<html>
|
<html><body><title>- Rebirth Request Menu -</title>
|
||||||
<body>
|
|
||||||
<title>- Rebirth Request Menu -</title>
|
|
||||||
<br>
|
<br>
|
||||||
|
So, you wish to be Reborn? Being Reborn has it's advantages, and it's disadvantages you know.<br>
|
||||||
|
When you are Reborn you are granted a new bonus skill, but your character is reset to level 1 and returned to his starting class. So choose wisely.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<center>
|
||||||
So, you wish to be Reborn? Being Reborn has it's advantages, and it's disadvantages you know. <br>
|
<button value="Request Rebirth" action="bypass -h custom_rebirth_confirmrequest" width=95 height=21 back="bigbutton_over" fore="bigbutton"/>
|
||||||
When you are Reborn you are granted a new bonus skill (listed above), <br>
|
</body></html>
|
||||||
but your character is reset to level 1 and returned to his starting class. So <br>
|
|
||||||
choose wisely.<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<button value=" Request Rebirth " action="bypass -h custom_rebirth_confirmrequest" width=250 height=36 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"/>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -125,7 +125,6 @@ public class Rebirth
|
|||||||
player.sendMessage("You do not meet the level requirement for a Rebirth!");
|
player.sendMessage("You do not meet the level requirement for a Rebirth!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (player.isSubClassActive())
|
else if (player.isSubClassActive())
|
||||||
{
|
{
|
||||||
player.sendMessage("Please switch to your Main Class before attempting a Rebirth.");
|
player.sendMessage("Please switch to your Main Class before attempting a Rebirth.");
|
||||||
@@ -198,7 +197,6 @@ public class Rebirth
|
|||||||
|
|
||||||
// Resets character to first class.
|
// Resets character to first class.
|
||||||
player.setClassId(player.getBaseClass());
|
player.setClassId(player.getBaseClass());
|
||||||
|
|
||||||
player.broadcastUserInfo();
|
player.broadcastUserInfo();
|
||||||
|
|
||||||
final byte lvl = Byte.parseByte(returnToLevel + "");
|
final byte lvl = Byte.parseByte(returnToLevel + "");
|
||||||
@@ -279,7 +277,7 @@ public class Rebirth
|
|||||||
final ItemInstance itemNeeded = player.getInventory().getItemByItemId(itemId);
|
final ItemInstance itemNeeded = player.getInventory().getItemByItemId(itemId);
|
||||||
if ((itemNeeded == null) || (itemNeeded.getCount() < itemAmount))
|
if ((itemNeeded == null) || (itemNeeded.getCount() < itemAmount))
|
||||||
{
|
{
|
||||||
player.sendMessage("You need atleast " + itemAmount + " [ " + itemName + " ] to request a Rebirth!");
|
player.sendMessage("You need at least " + itemAmount + " " + itemName + " to request a Rebirth!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +312,7 @@ public class Rebirth
|
|||||||
player.addSkill(bonusSkill, false);
|
player.addSkill(bonusSkill, false);
|
||||||
|
|
||||||
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
||||||
rebirthText = new CreatureSay(0, ChatType.HERO_VOICE, "Rebirth Manager ", " Granted you [ " + bonusSkill.getName() + " ] level [ " + bonusSkill.getLevel() + " ]!");
|
rebirthText = new CreatureSay(0, ChatType.HERO_VOICE, "Rebirth Manager", "Granted you " + bonusSkill.getName() + " level " + bonusSkill.getLevel() + "!");
|
||||||
player.sendPacket(rebirthText);
|
player.sendPacket(rebirthText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.actor.instance.ClassMasterInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.SymbolMakerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.SymbolMakerInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.entity.Rebirth;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.CTF;
|
import org.l2jmobius.gameserver.model.entity.event.CTF;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.DM;
|
import org.l2jmobius.gameserver.model.entity.event.DM;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
||||||
@@ -307,11 +308,14 @@ public class RequestBypassToServer extends GameClientPacket
|
|||||||
player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
|
player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (_command.startsWith("OlympiadArenaChange"))
|
||||||
if (_command.startsWith("OlympiadArenaChange"))
|
|
||||||
{
|
{
|
||||||
Olympiad.bypassChangeArena(_command, player);
|
Olympiad.bypassChangeArena(_command, player);
|
||||||
}
|
}
|
||||||
|
else if (_command.startsWith("custom_rebirth_"))
|
||||||
|
{
|
||||||
|
Rebirth.getInstance().handleCommand(player, _command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@@ -1,15 +1,8 @@
|
|||||||
<html>
|
<html><body><title>- Rebirth Request Menu -</title>
|
||||||
<body>
|
|
||||||
<title>- Rebirth Request Menu -</title>
|
|
||||||
<br>
|
<br>
|
||||||
|
So, you wish to be Reborn? Being Reborn has it's advantages, and it's disadvantages you know.<br>
|
||||||
|
When you are Reborn you are granted a new bonus skill, but your character is reset to level 1 and returned to his starting class. So choose wisely.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<center>
|
||||||
So, you wish to be Reborn? Being Reborn has it's advantages, and it's disadvantages you know. <br>
|
<button value="Request Rebirth" action="bypass -h custom_rebirth_confirmrequest" width=95 height=21 back="bigbutton_over" fore="bigbutton"/>
|
||||||
When you are Reborn you are granted a new bonus skill (listed above), <br>
|
</body></html>
|
||||||
but your character is reset to level 1 and returned to his starting class. So <br>
|
|
||||||
choose wisely.<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<button value=" Request Rebirth " action="bypass -h custom_rebirth_confirmrequest" width=250 height=36 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"/>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -125,7 +125,6 @@ public class Rebirth
|
|||||||
player.sendMessage("You do not meet the level requirement for a Rebirth!");
|
player.sendMessage("You do not meet the level requirement for a Rebirth!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (player.isSubClassActive())
|
else if (player.isSubClassActive())
|
||||||
{
|
{
|
||||||
player.sendMessage("Please switch to your Main Class before attempting a Rebirth.");
|
player.sendMessage("Please switch to your Main Class before attempting a Rebirth.");
|
||||||
@@ -198,7 +197,6 @@ public class Rebirth
|
|||||||
|
|
||||||
// Resets character to first class.
|
// Resets character to first class.
|
||||||
player.setClassId(player.getBaseClass());
|
player.setClassId(player.getBaseClass());
|
||||||
|
|
||||||
player.broadcastUserInfo();
|
player.broadcastUserInfo();
|
||||||
|
|
||||||
final byte lvl = Byte.parseByte(returnToLevel + "");
|
final byte lvl = Byte.parseByte(returnToLevel + "");
|
||||||
@@ -279,7 +277,7 @@ public class Rebirth
|
|||||||
final ItemInstance itemNeeded = player.getInventory().getItemByItemId(itemId);
|
final ItemInstance itemNeeded = player.getInventory().getItemByItemId(itemId);
|
||||||
if ((itemNeeded == null) || (itemNeeded.getCount() < itemAmount))
|
if ((itemNeeded == null) || (itemNeeded.getCount() < itemAmount))
|
||||||
{
|
{
|
||||||
player.sendMessage("You need atleast " + itemAmount + " [ " + itemName + " ] to request a Rebirth!");
|
player.sendMessage("You need at least " + itemAmount + " " + itemName + " to request a Rebirth!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +312,7 @@ public class Rebirth
|
|||||||
player.addSkill(bonusSkill, false);
|
player.addSkill(bonusSkill, false);
|
||||||
|
|
||||||
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
||||||
rebirthText = new CreatureSay(0, ChatType.HERO_VOICE, "Rebirth Manager ", " Granted you [ " + bonusSkill.getName() + " ] level [ " + bonusSkill.getLevel() + " ]!");
|
rebirthText = new CreatureSay(0, ChatType.HERO_VOICE, "Rebirth Manager", "Granted you " + bonusSkill.getName() + " level " + bonusSkill.getLevel() + "!");
|
||||||
player.sendPacket(rebirthText);
|
player.sendPacket(rebirthText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.actor.instance.ClassMasterInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.SymbolMakerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.SymbolMakerInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.entity.Rebirth;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.CTF;
|
import org.l2jmobius.gameserver.model.entity.event.CTF;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.DM;
|
import org.l2jmobius.gameserver.model.entity.event.DM;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
||||||
@@ -307,11 +308,14 @@ public class RequestBypassToServer extends GameClientPacket
|
|||||||
player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
|
player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (_command.startsWith("OlympiadArenaChange"))
|
||||||
if (_command.startsWith("OlympiadArenaChange"))
|
|
||||||
{
|
{
|
||||||
Olympiad.bypassChangeArena(_command, player);
|
Olympiad.bypassChangeArena(_command, player);
|
||||||
}
|
}
|
||||||
|
else if (_command.startsWith("custom_rebirth_"))
|
||||||
|
{
|
||||||
|
Rebirth.getInstance().handleCommand(player, _command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user