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

Python / LUA - Danse de Groupe


Messages recommandés

Centre de Téléchargement

Hidden Content

    Give reaction to this post to see the hidden content.
( Interne )

Bonsoir, 

 

ce soir je vous partages le système de danse en groupe

 

Pré-requis:

 

Côté client : 

 

- Locale_Fr ( locale_interface )

- Root ( constinfo.py / game.py / uisystemoption.py )

- UiScript ( systemoptiondialog.py )

 

Côté serveur :

 

- Quête ( 

Hidden Content

    Give reaction to this post to see the hidden content.
 )

- Questlib.lua

 

Commençons par le Locale_fr, ouvez locale_interface et rajoutez : 

 

Citation

OPTION_PARTY_DANS    Panel dance de groupe

 

Ouvrez constinfo.py ( ROOT ) et rajoutez :

 

Citation

INPUT_IGNORE = 0
PARTY_E = {
    'qid'    : 0,
}

 

Ouvrez game.py ( ROOT ) et cherchez : 

 

Citation

"CloseSafebox"            : self.CommandCloseSafebox,

 

Rajoutez ceci en dessous :

 

Citation

'PARTY_E'                : self._PartyEmotionsCMD,

 

Cherchez : 

 

Citation

def OpenQuestWindow(self, skin, idx):
        self.interface.OpenQuestWindow(skin, idx)

 

Remplacez par : 

 

Citation

    def OpenQuestWindow(self, skin, idx):
        if constInfo.INPUT_IGNORE == 1:
            return
            
        self.interface.OpenQuestWindow(skin, idx)

 

Cherchez : 

 

Citation

    def __PlayMusic(self, flag, filename):
        flag = int(flag)
        if flag:
            snd.FadeOutAllMusic()
            musicInfo.SaveLastPlayFieldMusic()
            snd.FadeInMusic("BGM/" + filename)
        else:
            snd.FadeOutAllMusic()
            musicInfo.LoadLastPlayFieldMusic()
            snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)

 

Rajoutez en dessous :


 

Citation

 

    def GetInputStart(self):
        constInfo.INPUT_IGNORE = 1

    def GetInputStop(self):
        constInfo.INPUT_IGNORE = 0
        
    def _PartyEmotionsCMD(self, command):
        cmd = command.split('/')

        if cmd[0] == 'QID':
            constInfo.PARTY_E['qid'] = int(cmd[1])

 



Ouvrez uisystemoption.py et cherchez : 

 

Citation

self.tilingApplyButton=GetObject("tiling_apply")

 

Rajoutez en dessous : 

 

Citation

self.partyEmotionsButton=GetObject("party_emotions_button")

 

Cherchez : 

 

Citation

self.tilingApplyButton = 0

 

Rajoutez en dessous : 

 

Citation

self.partyEmotionsButton = 0

 

Cherchez : 

 

Citation

self.tilingApplyButton.SAFE_SetEvent(self.__OnClickTilingApplyButton)

 

Rajoutez en dessous : 


 

Citation

 

self.partyEmotionsButton.SAFE_SetEvent(self.__OnClickPartyEmotionsButton)

 

 

 

Cherchez : 

 

Citation

 

def __OnClickTilingApplyButton(self):
        self.__NotifyChatLine(localeInfo.SYSTEM_OPTION_TILING_EXIT)
        if 0==self.tilingMode:
            background.EnableSoftwareTiling(1)
        else:
            background.EnableSoftwareTiling(0)

        net.ExitGame()

 

 

Rajoutez en dessous : 


 

Citation

 

    def __OnClickPartyEmotionsButton(self):
        import event
        event.QuestButtonClick(int(constInfo.PARTY_E["qid"]))
        self.Close()
        return True

 

 

 

Ouvrez Systemoptiondialog.py ( UISCRIPT ) et cherchez :

 

Citation

 

window = {
    "name": "SystemOptionDialog",
    "style": ("movable", "float",),

    "x": 0,
    "y": 0,

    "width": 305,
    "height": 255,

 

 

Remplacez par : 

 

Citation

 

window = {
    "name": "SystemOptionDialog",
    "style": ("movable", "float",),

    "x": 0,
    "y": 0,

    "width": 305,
    "height": 255 + 25,

 

 

 

Cherchez :


 

Citation

 

               "name": "board",
                "type": "board",

                "x": 0,
                "y": 0,

                "width": 305,
                "height": 255,

 

 

 

Remplacez par : 

 

Citation

 

                "name": "board",
                "type": "board",

                "x": 0,
                "y": 0,

                "width": 305,
                "height": 255 + 25,

 

 

Cherchez :

 

Citation

 

                {
                    "name" : "tiling_apply",
                    "type" : "button",

                    "x" : 110+100,
                    "y" : 185,

                    "text" : uiScriptLocale.OPTION_TILING_APPLY,

                    "default_image" : ROOT_PATH + "middle_Button_01.sub",
                    "over_image" : ROOT_PATH + "middle_Button_02.sub",
                    "down_image" : ROOT_PATH + "middle_Button_03.sub",
                },

 

 

Rajoutez en dessous : 


 

Citation

 

               ## PARTY DANS
                {
                    "name": "party_emotions_text",
                    "type": "text",

                    "x": 40 + TEXT_TEMPORARY_X,
                    "y": 165 + 50,

                    "text": "Groupe emotion",
                },
                {
                    "name": "party_emotions_button",
                    "type": "button",

                    "x": 110,
                    "y": 165 + 50,
                            
                    "text": uiScriptLocale.OPTION_PARTY_DANS,

                    "default_image": ROOT_PATH + "xlarge_Button_01.sub",
                    "over_image": ROOT_PATH + "xlarge_Button_02.sub",
                    "down_image": ROOT_PATH + "xlarge_Button_03.sub",
                },

 

 

ATTENTION ICI C'EST A VOUS DE RÉAJUSTER SI VOUS AVEZ DÉJÀ QUELQUES CHOSE D'INSTALLER, SINON PAS BESOIN D'Y TOUCHER !

 

!!! ATTENTIONS AUX TABULATIONS !!!

 

Pour finir, ouvrez votre questlib.lua et rajoutez :

 

Citation

function getinput(value)
    cmdchat("GetInputStart")
    local ret = input(cmdchat(value))
    cmdchat("GetInputStop")
    return ret
end

 

N'OUBLIEZ PAS DE  FAIRE LIRE VOTRE QUÊTE ET DE LA RAJOUTER DANS LA LISTE.

 

Vidéo : 

 

 

 

Source : TURKMMO

 

Asesino.

 

  • Love 1
Lien vers le commentaire
Partager sur d’autres sites

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

Meilleurs contributeurs dans ce sujet

Seul le chef du groupe peut lancer les danses / émotions. 

 

Malheureusement non, tout ceux qui sont en groupe participeront. Mais, possible de le rajouter. 

 

De plus, y a un timer de 3 secondes qui peut être modifier. 

Lien vers le commentaire
Partager sur d’autres sites



  • brilliantdiscord_widget
  • Flux d'Activité

    1. 37
    2. 21

      Metin2 en 2020 peut-on en parler?

    3. 0

      METIN2Project

    4. 3

      Ressources - UnPack - Metin2 Client - Officiel

    5. 0

      Barre des tâches d'argent étendue

    6. 16

      Redémarrage automatique des channels

    7. 16

      Multi Logo GM / SGM / GA

  • En ligne récemment

    • Aucun utilisateur enregistré regarde cette page.

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.