Aller au contenu
Top-Metin2.org - Vous êtes à la recherche d'un serveur Metin 2 ? ×
×
×
  • Créer...
  • 0

Problème codage python


MacDonarty

Question

Bonjour,

 

Je suis en train d'installer un système cependant, je dois ajouter un bout de code à un endroit où le code à déjà été modifié. :

 

Code de base : 

 

 

if type < 500:  return

 

 

Modifié par : 

 

 

		if (app.ENABLE_AFFECT_POLYMORPH_REMOVE):		if type < 500 and type != chr.NEW_AFFECT_POLYMORPH:			return	else:		if type < 500:			return

 

 

cependant j'ai déjà modifié cet endroit de code : j'ai ça actuellement :

 

		if app.ENABLE_NEW_AFFECT_POTION:		if type < 500 and not type == AFFECT_POTION["affect"][0] and not type == AFFECT_POTION["affect"][1] and not type == AFFECT_POTION["affect"][2] and not type == AFFECT_POTION["affect"][3] and not type == AFFECT_POTION["affect"][4] and not type == AFFECT_POTION["affect"][5]:			return	else:		if type < 500:			return

 

 

comment ajouter cette partie de code pour que j'ai bien l'affichage des deux systèmes :

 

 

		if (app.ENABLE_AFFECT_POLYMORPH_REMOVE):		if type < 500 and type != chr.NEW_AFFECT_POLYMORPH:			return

 

 

Merci !

Lien vers le commentaire
Partager sur d’autres sites

  • Réponses 14
  • Créé
  • Dernière réponse

Meilleurs contributeurs dans cette question

Meilleurs contributeurs dans cette question

14 réponses à cette question

Messages recommandés

  • 0

Salut ! 

 

J'ai déjà essayé ça: mais ça ne fonctionne pas

 

if app.ENABLE_NEW_AFFECT_POTION:

           if type < 500 and not type == AFFECT_POTION["affect"][0] and not type == AFFECT_POTION["affect"][1] and not type == AFFECT_POTION["affect"][2] and not type == AFFECT_POTION["affect"][3] and not type == AFFECT_POTION["affect"][4] and not type == AFFECT_POTION["affect"][5]:

               return

 

elif (app.ENABLE_AFFECT_POLYMORPH_REMOVE):

 if type < 500 and type != chr.NEW_AFFECT_POLYMORPH:

return

else:

if type < 500:

     return

Lien vers le commentaire
Partager sur d’autres sites

  • 0
  • Développeur

Bonsoir,

 

Vous tournez un peu autour du pot sur ce coup, je suis légèrement rouillé et très fatigué alors je peux dire une bêtise, mais si tu es sûr de garder le système tu as juste à avoir ce code

 

 

       if app.ENABLE_NEW_AFFECT_POTION:           if type < 500 and not type == AFFECT_POTION["affect"][0] and not type == AFFECT_POTION["affect"][1] and not type == AFFECT_POTION["affect"][2] and not type == AFFECT_POTION["affect"][3] and not type == AFFECT_POTION["affect"][4] and not type == AFFECT_POTION["affect"][5] and type != chr.NEW_AFFECT_POLYMORPH:               return       else:           if type < 500:               return

 

 

Ce n'est pas testé, je n'ai pas rajouté de conditions supplémentaires mais ça devrait marcher :)

 

Bonne soirée !

Lien vers le commentaire
Partager sur d’autres sites

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.


  • brilliantdiscord_widget
  • Flux d'Activité

    1. 6

      problème de connexion à mon serveur local (je suis débutant dans ce genre d'entreprise )

    2. 2

      problème de lancement serveur

    3. 9
    4. 0

      [PVM/PVP] ATLAX2 - EASY PLAY

    5. 2

      problème de lancement serveur

Information importante

Conditions d’utilisation / Politique de confidentialité / Règles / Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.