L2J-FR
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.


Forum pour réunir les administrateurs de serveur L2
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
-24%
Le deal à ne pas rater :
PC Portable Gaming 15.6″ Medion Erazer Deputy P40 (FHD 144Hz, RTX ...
759.99 € 999.99 €
Voir le deal

 

 Enchant Scroll S80

Aller en bas 
AuteurMessage
Invité
Invité




Enchant Scroll S80 Empty
MessageSujet: Enchant Scroll S80   Enchant Scroll S80 Empty25/07/08, 03:56 pm

Bonjour !

Voila, je me suis lancé dans la conception d'Enchant Scroll Armor & Weapon S80 (Normal, Crystal & Blessed)

Mais, là, je me heurte à un mur. Je m'explique :

J'ai ajouté les IDs de mes nouveaux scrolls dans les Handlers, les clientpackets et dans le FuncEnchant.java.

Problème : Quand on clique sur un scroll, il ouvre la fenêtre pour selectionner les items à enchant, mais, rien, nada, keutchi, pas d'items dans cette fenêtre !

J'ai trouvé que dans le dossier des skills du Datapack, il existait des skills par rapport à ces Enchant Scroll.

2ème problème : Le skill n'est relié à aucun item.

Avez-vous quelques pistes à ce sujet ?

Si oui, je suis preneur !

Merci Smile
Revenir en haut Aller en bas
Tauphraen

Tauphraen


Nombre de messages : 191
Date d'inscription : 27/11/2007

Enchant Scroll S80 Empty
MessageSujet: Re: Enchant Scroll S80   Enchant Scroll S80 Empty09/08/08, 06:36 pm

Je fais un petit up de ce topic car nous trouvons pas la solution à notre problème.

Nous avons bien défini nos scrolls s80 dans les scripts RequestEnchantItem et EnchantScrolls mais lorsqu'on clique sur le scroll, la fenêtre s'ouvre bien mais nous voyons aucun item à enchanter.
Cependant lorsqu'on clique sur le scroll s, nous voyons les items s et s80 à enchanter mais dès qu'on essaye d'enchanter les items s80, nous avons le message d'erreur : "condition to enchant not appropriate". Ce message signifie que nous avons bien restreint l'utilisation des scrolls s sur les items s.

Nous avons fait le tour de tout les scripts mais nous ne trouvons aucune solution pour limiter l'affichage des scroll s aux items s et l'affichage des scrolls s80 avec les items s80 !

voilà les codes :

EnchantScrolls

Code:
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jfree.gameserver.handler.itemhandlers;

import com.l2jfree.Config;
import com.l2jfree.gameserver.Shutdown;
import com.l2jfree.gameserver.handler.IItemHandler;
import com.l2jfree.gameserver.model.L2ItemInstance;
import com.l2jfree.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfree.gameserver.model.actor.instance.L2PlayableInstance;
import com.l2jfree.gameserver.network.SystemMessageId;
import com.l2jfree.gameserver.network.serverpackets.ChooseInventoryItem;
import com.l2jfree.gameserver.network.serverpackets.SystemMessage;

public class EnchantScrolls implements IItemHandler
{
   private static final int[]   ITEM_IDS   =
                                 {
         729, 730, 731, 732, 6569, 6570, // a grade
         947, 948, 949, 950, 6571, 6572, // b grade
         951, 952, 953, 954, 6573, 6574, // c grade
         955, 956, 957, 958, 6575, 6576, // d grade
         959, 960, 961, 962, 6577, 6578, // s grade
         55004, 55005, 55006, 55007, 55008, 55009 //s80 grade
                                 };

   public void useItem(L2PlayableInstance playable, L2ItemInstance item)
   {
      if (!(playable instanceof L2PcInstance))
         return;
      L2PcInstance activeChar = (L2PcInstance) playable;
      if (activeChar.isCastingNow())
         return;

      // Restrict enchant during restart/shutdown (because of an existing exploit)
      if (Config.SAFE_REBOOT && Config.SAFE_REBOOT_DISABLE_ENCHANT && Shutdown.getCounterInstance() != null
            && Shutdown.getCounterInstance().getCountdown() <= Config.SAFE_REBOOT_TIME)
      {
         activeChar.sendMessage("Enchanting items is not allowed during restart/shutdown.");
         return;
      }

      activeChar.setActiveEnchantItem(item);
      activeChar.sendPacket(new SystemMessage(SystemMessageId.SELECT_ITEM_TO_ENCHANT));

      int itemId = item.getItemId();

      if (Config.ALLOW_CRYSTAL_SCROLL && (itemId == 957 || itemId == 958 || itemId == 953 || itemId == 954 || // Crystal scrolls D and C Grades
            itemId == 949 || itemId == 950 || itemId == 731 || itemId == 732 || // Crystal scrolls B and A Grades
            itemId == 961 || itemId == 962 || itemId == 55006 || itemId == 55007)) // Crystal scrolls S Grade and S80 Grades
         activeChar.sendPacket(new ChooseInventoryItem(itemId - 2));
      else
         activeChar.sendPacket(new ChooseInventoryItem(itemId));

      return;
   }

   public int[] getItemIds()
   {
      return ITEM_IDS;
   }
}

notes :

55000 > crystal s80
55004 > id du scroll enchant weapon s80
55005 > id du scroll enchant armor s80
55006 > id du crystal scroll enchant weapon s80
55007 > id du crystal scroll enchant armor s80
55008 > id du blessed scroll enchant weapon s80
55009 > id du blessed scroll enchant armor s80

RequestEnchantItem

Code:
protected static final Log   _log                  = LogFactory.getLog(Inventory.class.getName());
   private static final String   _C__58_REQUESTENCHANTITEM   = "[C] 58 RequestEnchantItem";
   private static final int[]   ENCHANT_SCROLLS            =
                                             { 729, 730, 947, 948, 951, 952, 955, 956, 959, 960, 55004, 55005 };
   private static final int[]   CRYSTAL_SCROLLS            =
                                             { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962, 55006, 55007 };
   private static final int[]   BLESSED_SCROLLS            =
                                             { 6569, 6570, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578, 55008, 55009 };

   private int               _objectId;

Code:
switch (item.getItem().getCrystalType())
      {
      // By Sacrifice
      case L2Item.CRYSTAL_S80:
         crystalId = 55000; // 55000 = ID du Crystal: S80 Grade
         switch (scroll.getItemId())
         {
         case 55004:
         case 55006:
         case 55008:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 55005:
         case 55007:
         case 55009:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
         break;
      //End code Sacrifice
      case L2Item.CRYSTAL_A:
         crystalId = 1461;
         switch (scroll.getItemId())
         {
         case 729:
         case 731:
         case 6569:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 730:
         case 732:
         case 6570:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
         break;
      case L2Item.CRYSTAL_B:
         crystalId = 1460;
         switch (scroll.getItemId())
         {
         case 947:
         case 949:
         case 6571:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 948:
         case 950:
         case 6572:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
         break;
      case L2Item.CRYSTAL_C:
         crystalId = 1459;
         switch (scroll.getItemId())
         {
         case 951:
         case 953:
         case 6573:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 952:
         case 954:
         case 6574:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
         break;
      case L2Item.CRYSTAL_D:
         crystalId = 1458;
         switch (scroll.getItemId())
         {
         case 955:
         case 957:
         case 6575:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 956:
         case 958:
         case 6576:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
         break;
         case L2Item.CRYSTAL_S:
         crystalId = 1462;
         switch (scroll.getItemId())
         {
         case 959:
         case 961:
         case 6577:
            if (itemType2 == L2Item.TYPE2_WEAPON)
               enchantItem = true;
            break;
         case 960:
         case 962:
         case 6578:
            if ((itemType2 == L2Item.TYPE2_SHIELD_ARMOR) || (itemType2 == L2Item.TYPE2_ACCESSORY))
               enchantItem = true;
            break;
         }
      }

Merci de vos réponses.
Revenir en haut Aller en bas
http://sacrifice.montagnedudestin.com
 
Enchant Scroll S80
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
L2J-FR :: Général :: Aides et Conseils-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser