Jump to content

Recommended Posts

Posted

Configurable 1st,2nd,3rd Class Prizes if ClassMaster enabled... 

 

 

 

 

Index: D:/#PROJECT/l2jserver_IntGS/java/config/altsettings.properties

===================================================================

--- D:/#PROJECT/l2jserver_C5GS/java/config/altsettings.properties

+++ D:/#PROJECT/l2jserver_C5GS/java/config/altsettings.properties

@@ -103,6 +103,16 @@

# Default = False

AllowClassMasters = False

 

+#-------------------------------------------------------------

+# Class Master Proof Change prizes

+#-------------------------------------------------------------

+# 1st class prize

+ProofPrize1 = 300000

+# 2nd class prize

+ProofPrize2 = 3000000

+# 3nd class prize

+ProofPrize3 = 30000000

+

# Spell Book needed to learn skills

SpBookNeeded = True

 

Index: D:/#PROJECT/l2jserver_IntGS/java/net/sf/l2j/Config.java

===================================================================

--- D:/#PROJECT/l2jserver_C5GS/java/net/sf/l2j/Config.java (revision 703)

+++ D:/#PROJECT/l2jserver_C5GS/java/net/sf/l2j/Config.java (working copy)

@@ -499,8 +499,13 @@

    public static int MAX_DRIFT_RANGE;

 

    /** Allow fishing ? */

- public static boolean ALLOWFISHING;

+ public static boolean ALLOWFISHING;

   

+    /** Proof change prizes */

+    public static int PROOF_PRIZE1;

+    public static int PROOF_PRIZE2;

+    public static int PROOF_PRIZE3;

+   

    /** Jail config **/

    public static boolean JAIL_IS_PVP;

    public static boolean JAIL_DISABLE_CHAT;

@@ -1538,6 +1543,10 @@

               

                ALT_DEV_NO_QUESTS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoQuests", "False"));

                ALT_DEV_NO_SPAWNS                = Boolean.parseBoolean(altSettings.getProperty("AltDevNoSpawns", "False"));

+                PROOF_PRIZE1                    = Integer.parseInt(altSettings.getProperty("ProofPrize1", "300000"));

+                PROOF_PRIZE2                    = Integer.parseInt(altSettings.getProperty("ProofPrize2", "3000000"));

+                PROOF_PRIZE3                    = Integer.parseInt(altSettings.getProperty("ProofPrize3", "30000000"));

+

        }

        catch (Exception e)

        {

Index: D:/#PROJECT/l2jserver_IntGS/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java

===================================================================

--- D:/#PROJECT/l2jserver_IntGS/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java (revision 703)

+++ D:/#PROJECT/l2jserver_IntGS/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java (working copy)

@@ -19,12 +19,13 @@

package net.sf.l2j.gameserver.model.actor.instance;

 

import javolution.text.TextBuilder;

+

import net.sf.l2j.Config;

+import net.sf.l2j.gameserver.datatables.CharTemplateTable;

import net.sf.l2j.gameserver.ai.CtrlIntention;

-import net.sf.l2j.gameserver.datatables.CharTemplateTable;

import net.sf.l2j.gameserver.model.base.ClassId;

+import net.sf.l2j.gameserver.model.base.PlayerClass;

import net.sf.l2j.gameserver.model.base.ClassLevel;

-import net.sf.l2j.gameserver.model.base.PlayerClass;

import net.sf.l2j.gameserver.model.quest.Quest;

import net.sf.l2j.gameserver.serverpackets.ActionFailed;

import net.sf.l2j.gameserver.serverpackets.MyTargetSelected;

@@ -34,12 +35,13 @@

import net.sf.l2j.gameserver.templates.L2NpcTemplate;

 

 

+

//private static Logger _log = Logger.getLogger(L2ClassMasterInstance.class.getName());

private static int[] _secondClassIds = {2,3,5,6,9,8,12,13,14,16,17,20,21,23,24,27,

                                        28,30,33,34,36,37,40,41,43,46,48,51,52,55,57};

@@ -90,19 +92,22 @@

                case Second:

                    jobLevel = 2;

                    break;

+                case Third:

+                    jobLevel = 3;

+                    break;

                default:

-                    jobLevel = 3;

+                    jobLevel = 4;

}

 

if (!Config.ALLOW_CLASS_MASTERS)

- jobLevel = 3;

-

-            if (((level >= 20 && jobLevel == 1 ) ||

- (level >= 40 && jobLevel == 2 )) && Config.ALLOW_CLASS_MASTERS)

+ jobLevel = 4;

+

+            if (((level >= 20 && jobLevel == 1 && player.getAdena() >= Config.PROOF_PRIZE1 ) ||

+ (level >= 40 && jobLevel == 2 && player.getAdena() >= Config.PROOF_PRIZE2 )) && Config.ALLOW_CLASS_MASTERS)

{

showChatWindow(player, classId.getId());

}

- else if (level >= 76 && Config.ALLOW_CLASS_MASTERS && classId.getId() < 88)

+ else if (level >= 76 && player.getAdena() >= Config.PROOF_PRIZE3 && Config.ALLOW_CLASS_MASTERS && classId.getId() < 88)

{

for (int i = 0; i < _secondClassIds.length; i++)

{

@@ -114,8 +119,6 @@

                        sb.append("<tr><td><center>"+CharTemplateTable.getClassNameById(classId.getId())+" Class Master:</center></td></tr>");

                        sb.append("<tr><td><br></td></tr>");

                        sb.append("<tr><td><a action=\"bypass -h npc_"+getObjectId()+"_change_class "+(88+i)+"\">Advance to "+CharTemplateTable.getClassNameById(88+i)+"</a></td></tr>");

-                        sb.append("<tr><td><br></td></tr>");

-                        sb.append("<tr><td><a action=\"bypass -h npc_"+getObjectId()+"_upgrade_hatchling\">Upgrade Hatchling to Strider</a></td></tr>");

                        sb.append("</table></body></html>");

                        html.setHtml(sb.toString());

                        player.sendPacket(html);

@@ -131,14 +134,17 @@

switch (jobLevel)

{

case 1:

- sb.append("Come back here when you reached level 20 to change your class.<br>");

+ sb.append((new StringBuilder("Come back here when you reached <font color=\"LEVEL\">level 20</font> to change your class.<br>Also you'll need <font color=\"LEVEL\">")).append(Config.PROOF_PRIZE1).append(" adena</font> to change your class.").toString());

break;

case 2:

- sb.append("Come back here when you reached level 40 to change your class.<br>");

+ sb.append((new StringBuilder("Come back here when you reached <font color=\"LEVEL\">level 40</font> to change your class.<br>Also you'll need <font color=\"LEVEL\">")).append(Config.PROOF_PRIZE2).append(" adena</font> to change your class.").toString());

break;

case 3:

- sb.append("There is no class changes for you any more.<br>");

+                     sb.append((new StringBuilder("Come back here when you reached <font color=\"LEVEL\">level 76</font> to change your class.<br>Also you'll need <font color=\"LEVEL\">")).append(Config.PROOF_PRIZE3).append(" adena</font> to change your class.").toString());

break;

+ case 4:

+ sb.append("You are on 3rd occupation now.<br>");

+ break;

}

               

for (Quest q : Quest.findAllEvents())

@@ -175,12 +181,15 @@

            {

            case First:

            jobLevel = 1;

+                    player.reduceAdena("LvlUp", Config.PROOF_PRIZE1, this, true);

            break;

            case Second:

            jobLevel = 2;

+                    player.reduceAdena("LvlUp", Config.PROOF_PRIZE2, this, true);

            break;

            case Third:

            jobLevel = 3;

+                    player.reduceAdena("LvlUp", Config.PROOF_PRIZE3, this, true);

            break;

            default:

            jobLevel = 4;

@@ -223,7 +232,7 @@

            NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());

            TextBuilder sb = new TextBuilder();

            sb.append("<html><head><body>");

-            sb.append("You have now become a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.");

+            sb.append("You have now become a <font color=\"0033AA\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.");

            sb.append("</body></html>");

                       

            html.setHtml(sb.toString());

@@ -247,4 +256,4 @@

       

player.broadcastUserInfo();

}

-}

+}

\ No newline at end of file

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...