Jump to content

Question

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

Περνάς όλο τον κώδικα που έχεις? ή από το πρώτο ερρορ στέλνεις φώτο?

 

Στείλε τον κώδικα εδώ..

 

Δοκίμασε να τον βάλεις μετά από εδώ¨:

 

                else
                {
                    sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2_SUCCESSFULLY_ENCHANTED);
                    sm.addNumber(item.getEnchantLevel());
                    sm.addItemName(item.getItemId());
                    activeChar.sendPacket(sm);
                }

 

Και θα σβήσουν κάποια ερρορ.

Στείλε τον κώδικα..

Edited by 'Baggos'
  • 0
Posted

Περνάς όλο τον κώδικα που έχεις? ή από το πρώτο ερρορ στέλνεις φώτο?

 

Στείλε τον κώδικα εδώ..

 

Δοκίμασε να τον βάλεις μετά από εδώ¨:

                else
                {
                    sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2_SUCCESSFULLY_ENCHANTED);
                    sm.addNumber(item.getEnchantLevel());
                    sm.addItemName(item.getItemId());
                    activeChar.sendPacket(sm);
                }

Και θα σβήσουν κάποια ερρορ.

Στείλε τον κώδικα..

http://postimg.org/image/48i1wi951/

http://postimg.org/image/asotylmej/

http://postimg.org/image/d39y15d8p/

 

αυτα εχω τωρα ...

### Eclipse Workspace Patch 1.0
#P Dream_GameServer
Index: src/com/dream/Config.java
===================================================================
--- src/com/dream/Config.java    (revision 1783)
+++ src/com/dream/Config.java    (working copy)
@@ -91,6 +91,14 @@
     public static boolean GRIDS_ALWAYS_ON;
     public static String PROTECTED_ITEMS;
     public static FastList<Integer> LIST_PROTECTED_ITEMS = new FastList<>();
+    public static boolean ALLOW_REWARD_FAIL_ENCHANT;
+    public static int REWARD_FAIL_ENCHANT;
+    public static int REWARD_FAIL_ENCHANT_COUNT;
     public static Pattern CNAME_PATTERN;
     public static Pattern PET_NAME_PATTERN;
     public static Pattern CLAN_ALLY_NAME_PATTERN;
@@ -217,6 +225,25 @@
                 LIST_PROTECTED_ITEMS.add(Integer.parseInt(id.trim()));
             }
+            ALLOW_REWARD_FAIL_ENCHANT = Boolean.parseBoolean(altSettings.getProperty("AllowRewardFailEnchant", "False"));
+            REWARD_FAIL_ENCHANT = Integer.parseInt(altSettings.getProperty("RewardFailEnchantitemId", "57"));
+            REWARD_FAIL_ENCHANT_COUNT = Integer.parseInt(altSettings.getProperty("RewardFailEnchantCount", "2"));

             DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(altSettings.getProperty("DestroyPlayerDroppedItem", "false"));
             DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(altSettings.getProperty("DestroyEquipableItem", "false"));
             SAVE_DROPPED_ITEM = Boolean.parseBoolean(altSettings.getProperty("SaveDroppedItem", "false"));

Index: src/com/dream/game/network/clientpackets/RequestEnchantItem.java
===================================================================
--- src/com/dream/game/network/clientpackets/RequestEnchantItem.java    (revision 1754)
+++ src/com/dream/game/network/clientpackets/RequestEnchantItem.java    (working copy)
@@ -620,6 +620,18 @@
                         activeChar.sendPacket(new ExPutEnchantTargetItemResult(2, 0, 0));
                         return;
                     }
+                    
+                    if (Config.ALLOW_REWARD_FAIL_ENCHANT)
+                    {
+                        L2ItemInstance reward = activeChar.getInventory().addItem("Enchant", Config.REWARD_FAIL_ENCHANT, Config.REWARD_FAIL_ENCHANT_COUNT, activeChar, null);
+                        sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
+                        sm.addItemName(reward);
+                        sm.addNumber(Config.REWARD_FAIL_ENCHANT_COUNT);
+                        activeChar.sendPacket(sm);
+                        activeChar.getInventory().updateInventory(reward);
+                        activeChar.sendPacket(new ExPutEnchantTargetItemResult(1, Config.REWARD_FAIL_ENCHANT, Config.REWARD_FAIL_ENCHANT_COUNT));
+                    }
+                    
                     if (item.getEnchantLevel() > 0)
                     {
                         sm = new SystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_S2_EVAPORATED);








# Allow Reward Fail Enchant Default = False
AllowRewardFailEnchant = False

# Item ID for reward Fail enchant
RewardFailEnchantitemId = 57

#Count of reward Fail Enchant
RewardFailEnchantCount = 2
  • 0
Posted

Στις δύο πρώτες φώτο θα πατήσεις αυτό που σου λέει.

Από L2ItemInstance σε ItemInstance.

Στην δεύτερη to public.

Στην τρίτη φώτο δεν υπάρχει το "ExPutEnchantTargetItemResult". Δεν έχω πληκτρολόγιο να μπω eclipse να το κάνω.. Περίμενε να απαντήσει κάποιος.

Επίσης ρίξε τον κώδικα εκεί που σου είπα για να μην παίρνει error το sm.

  • 0
Posted (edited)

Αν καταλαβα καλα, θες να δινει reward οταν δεν πετυχαινει το enchant.
Πανε στο RequestEnchantItem.java και βαλε αυτο (1 line υποθεση ειναι):

else
{
+    activeChar.getInventory().addItem("FailureReward", ItemId, ItemQuantity, activeChar, item);
+
    // enchant failed, destroy item
    int crystalId = item.getItem().getCrystalItemId();
    int count = item.getCrystalCount() - (item.getItem().getCrystalCount() + 1) / 2;
Edited by `iAndre
  • 0
Posted (edited)

Στις δύο πρώτες φώτο θα πατήσεις αυτό που σου λέει.

Από L2ItemInstance σε ItemInstance.

Στην δεύτερη to public.

Στην τρίτη φώτο δεν υπάρχει το "ExPutEnchantTargetItemResult". Δεν έχω πληκτρολόγιο να μπω eclipse να το κάνω.. Περίμενε να απαντήσει κάποιος.

Επίσης ρίξε τον κώδικα εκεί που σου είπα για να μην παίρνει error το sm.

http://postimg.org/image/qgfdynyzz/

http://postimg.org/image/4km985o13/

 

 

 

Αν καταλαβα καλα, θες να δινει reward οταν δεν πετυχαινει το enchant.

Πανε στο RequestEnchantItem.java και βαλε αυτο (1 line υποθεση ειναι):

else
{
+    activeChar.getInventory().addItem("FailureReward", ItemId, ItemQuantity, activeChar, item);
+
    // enchant failed, destroy item
    int crystalId = item.getItem().getCrystalItemId();
    int count = item.getCrystalCount() - (item.getItem().getCrystalCount() + 1) / 2;

 

ναι αυτο θελω.εκανα αυτο που μ ειπες και βγαζει αυτα τα error:

http://postimg.org/image/832acgn5r/

http://postimg.org/image/n7vbgw27r/

Edited by aris96
  • 0
Posted

http://postimg.org/image/qgfdynyzz/

http://postimg.org/image/4km985o13/

 

 

ναι αυτο θελω.εκανα αυτο που μ ειπες και βγαζει αυτα τα error:

http://postimg.org/image/832acgn5r/

http://postimg.org/image/n7vbgw27r/

Παλικαρε διαβαζε τι γραφω ..

 

ItemId = βαζεις το id που θες ή βαζεις config.

ItemQuantity = βαζεις τη ποσοτητα που θες ή βαζεις config.

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
Answer this question...

×   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.



  • Posts

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock