Jump to content

Recommended Posts

Posted

Description

Allows you to configure the effect to Trade Players in Offline Mode.

 

Effects (the same order of images):

1 Bleed

2 Poison

3 Confusion

4 Silence

5 Sleep

6 Root

7 Petrification

8 Big Head

9 Flame

10 Fire Root Stun

11 Stealth

12 Imprisioning

 

5KXf9.jpg

 

Index: config/fun/offline.properties

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

--- config/fun/offline.properties (revision 7)

+++ config/fun/offline.properties (working copy)

@@ -12,6 +12,7 @@

 

# If set to True, name color will be changed then entering offline mode

OfflineNameColorEnable = False

+

# Color of the name in offline mode (if OfflineNameColorEnable = True)

OfflineNameColor = ff00ff

 

@@ -18,8 +19,27 @@

# After Server Restart or Shutdown, all players in Offline mode will be auto logged.

# Enable -> true, Disable -> false

RestoreOffliners=false

+

# Max Days after no auto relog.

OfflineMaxDays=0

+

# If a player finish to sell/buy he will be kicked from the Server.

# Enable -> true, Disable -> false

-OfflineDisconnectFinished=false

\ No newline at end of file

+OfflineDisconnectFinished=false

+

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

+# Offline Effect -

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

+# Add effect when entering offline mode.

+# Default: False

+OfflineTradeEffect = False

+

+# The effect that will be shown by players in offline mode.

+# Use:

+# - 1 Bleed      | 7  Petrification  - #

+# - 2 Poison      | 8  Big Head      - #

+# - 3 Confusion  | 9  Flame          - #

+# - 4 Silence    | 10 Fire Root Stun - #

+# - 5 Sleep      | 11 Stealth        - #

+# - 6 Root        | 12 Imprisioning  - #

+OfflineEffectId = 5

Index: head-src/com/l2jfrozen/Config.java

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

--- head-src/com/l2jfrozen/Config.java (revision 7)

+++ head-src/com/l2jfrozen/Config.java (working copy)

@@ -2402,6 +2413,9 @@

public static int OFFLINE_MAX_DAYS;

public static boolean OFFLINE_DISCONNECT_FINISHED;

 

+    public static boolean OFFLINE_TRADE_EFFECT;

+ public static int OFFLINE_EFFECT_ID;

+

//============================================================

public static void loadOfflineConfig()

{

@@ -2422,7 +2436,9 @@

RESTORE_OFFLINERS = Boolean.parseBoolean(OfflineSettings.getProperty("RestoreOffliners", "false"));

OFFLINE_MAX_DAYS = Integer.parseInt(OfflineSettings.getProperty("OfflineMaxDays", "10"));

OFFLINE_DISCONNECT_FINISHED = Boolean.parseBoolean(OfflineSettings.getProperty("OfflineDisconnectFinished", "true"));

-

+

+ OFFLINE_TRADE_EFFECT = Boolean.parseBoolean(OfflineSettings.getProperty("OfflineTradeEffect", "False"));

+ OFFLINE_EFFECT_ID = Integer.parseInt(OfflineSettings.getProperty("OfflineEffectId", "1"));

}

catch(Exception e)

{

Index: head-src/com/l2jfrozen/gameserver/datatables/OfflineTradeTable.java

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

--- head-src/com/l2jfrozen/gameserver/datatables/OfflineTradeTable.java (revision 7)

+++ head-src/com/l2jfrozen/gameserver/datatables/OfflineTradeTable.java (working copy)

@@ -19,8 +19,6 @@

package com.l2jfrozen.gameserver.datatables;

 

/**

- *

- *

  * @author Enzo

  */

 

@@ -32,6 +30,7 @@

import java.util.logging.Logger;

 

import com.l2jfrozen.Config;

+import com.l2jfrozen.gameserver.model.L2Character;

import com.l2jfrozen.gameserver.model.L2ManufactureItem;

import com.l2jfrozen.gameserver.model.L2ManufactureList;

import com.l2jfrozen.gameserver.model.L2World;

@@ -44,8 +43,6 @@

import com.l2jfrozen.util.CloseUtil;

import com.l2jfrozen.util.database.L2DatabaseFactory;

 

-

-

public class OfflineTradeTable

{

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

@@ -213,6 +210,50 @@

player.setClient(client);

player.setOffline(true);

player.setOfflineStartTime(time);

+

+ if(Config.OFFLINE_TRADE_EFFECT)

+ {

+ switch(Config.OFFLINE_EFFECT_ID)

+ {

+ case 1:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_BLEEDING);

+ break;

+ case 2:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_POISON);

+ break;

+ case 3:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_CONFUSED);

+ break;

+ case 4:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_MUTED);

+ break;

+ case 5:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_SLEEP);

+ break;

+ case 6:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_ROOT);

+ break;

+ case 7:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);

+ break;

+ case 8:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_BIG_HEAD);

+ break;

+ case 9:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLAME);

+ break;

+ case 10:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FIREROOT_STUN);

+ break;

+ case 11:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_STEALTH);

+ break;

+ case 12:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);

+ break;

+ }

+ }

+

player.spawnMe(player.getX(), player.getY(), player.getZ());

LoginServerThread.getInstance().addGameServerLogin(player.getAccountName(), client);

PreparedStatement stm_items = con.prepareStatement(LOAD_OFFLINE_ITEMS);

Index: head-src/com/l2jfrozen/gameserver/network/L2GameClient.java

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

--- head-src/com/l2jfrozen/gameserver/network/L2GameClient.java (revision 7)

+++ head-src/com/l2jfrozen/gameserver/network/L2GameClient.java (working copy)

@@ -41,6 +41,7 @@

import com.l2jfrozen.gameserver.datatables.sql.ClanTable;

import com.l2jfrozen.gameserver.managers.AwayManager;

import com.l2jfrozen.gameserver.model.CharSelectInfoPackage;

+import com.l2jfrozen.gameserver.model.L2Character;

import com.l2jfrozen.gameserver.model.L2Clan;

import com.l2jfrozen.gameserver.model.L2World;

import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;

@@ -1001,6 +1002,49 @@

player.broadcastUserInfo();

}

 

+ if(Config.OFFLINE_TRADE_EFFECT)

+ {

+ switch(Config.OFFLINE_EFFECT_ID)

+ {

+ case 1:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_BLEEDING);

+ break;

+ case 2:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_POISON);

+ break;

+ case 3:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_CONFUSED);

+ break;

+ case 4:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_MUTED);

+ break;

+ case 5:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_SLEEP);

+ break;

+ case 6:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_ROOT);

+ break;

+ case 7:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_2);

+ break;

+ case 8:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_BIG_HEAD);

+ break;

+ case 9:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLAME);

+ break;

+ case 10:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FIREROOT_STUN);

+ break;

+ case 11:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_STEALTH);

+ break;

+ case 12:

+ player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);

+ break;

+ }

+ }

+

if (player.getOfflineStartTime() == 0)

player.setOfflineStartTime(System.currentTimeMillis());

 

Creditos : RedHot

Posted

can it be done to make the offline traders to transform into one or more transformations? Like Rabbit, pig, etc.

 

Ofc yes, you can use polyself/polymorph packages.

Guest
This topic is now closed to further replies.

×
×
  • Create New...