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

antok

Propriétaire d'un Serveur Privé
  • Compteur de contenus

    3 568
  • Inscription

  • Dernière visite

  • Jours gagnés

    3

Messages posté(e)s par antok

  1. Sans tableau :

    quest xxxxx begin
    state start begin
    when kill with not npc.is_pc() and (npc.get_race() == ID_MOB_1 or npc.get_race() == ID_MOD_2 or ....) begin
    end
    end
    end
    

    Avec tableau :

    quest xxxxx begin
    state start begin
    when kill with not npc.is_pc() and table_is_in(locale.tableManus, npc.get_race()) begin
    end
    end
    end
    

    + ce code à mettre dans locale.lua :

    locale.tableManus = {ID_MOB_1, ID_MOB_2, ID_MOB_....}

  2. Yop, tu peux aussi rajouter qu'en mettant ton tableau dans locale.lua il sera accessible par toute les quêtes.

    Vous pouvez aussi créer des fonctions de ce type (dans le questlib.lua) :

    tableau = {["key"] = "value" }
    
    function tableau.maFonction()
    return "CA MARCHE!!!!! : "..tableau["key"].."."
    end
    

     

    chat(tableau.maFonction()) -- code placé dans votre quête
    

     

    Ce code affichera "CA MARCHE!!!!! : value." dans le chat.

  3. quest antick begin
    state start begin
    	when kill with npc.is_pc() and pc.get_map_index() != ID_MAP_WAR begin
    		local vid = npc.get_vid()
    		local old = pc.select(vid)
    			affect.add_collect(apply.HP_REGEN,30000,10)
    			affect.add_collect(apply.BLOCK,30000,10)
    		pc.select(old)
    	end
    end
    end

     

    Le game 40k possède déjà la fonction npc.get_vid()

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.