Jump to content
  • 0
Sign in to follow this  
Daiko

Help with NPC

Question

Hello everyone, I am new forum and I need a help in the script so I would like it to run just the command when someone clicks npc only when someone clicks

 

OnInstanceInit:
    areamonster "1@tower",7,351,17,387,"Metaling",1613,15,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Marin",1242,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Poporing",1031,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Drops",1113,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Mastering",1090,1,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Poring",1002,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    end;
 
OnMyMobDead:
    set .@mob_dead_num,mobcount("1@tower",instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead");
    if (.@mob_dead_num < 1) {
        instance_announce -1, "Todos os monstros no 1° andar foram derrotados.",bc_map,"0xffff00";
        donpcevent instance_npcname("1FGate102tower", instance_id())+"::OnEnable";
        //SetItemPartyInMap in_102floor 1
    }
    else
        instance_announce -1, "Monstros vivos no 1° andar: " + .@mob_dead_num,bc_map,"0x00ff99";
    end;

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Muito fácil. Desta forma o trecho de script que vc publicou funcionará ao clicar no NPC que estará em prontera 150,150

 

prontera,150,150,0 script 456, {

    areamonster "1@tower",7,351,17,387,"Metaling",1613,15,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Marin",1242,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Poporing",1031,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Drops",1113,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Mastering",1090,1,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    areamonster "1@tower",7,351,17,387,"Poring",1002,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
    end;
 
OnMyMobDead:
    set .@mob_dead_num,mobcount("1@tower",instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead");
    if (.@mob_dead_num < 1) {
        instance_announce -1, "Todos os monstros no 1° andar foram derrotados.",bc_map,"0xffff00";
        donpcevent instance_npcname("1FGate102tower", instance_id())+"::OnEnable";
        //SetItemPartyInMap in_102floor 1
    }
    else
        instance_announce -1, "Monstros vivos no 1° andar: " + .@mob_dead_num,bc_map,"0x00ff99";
    end;

}

 

É algo bem básico, entendeu?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.