Jump to content

  •  

Photo

Help with NPC

npc script

  • Please log in to reply
1 reply to this topic

#1 Daiko

Daiko

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 22 March 2017 - 03:51 AM

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;


#2 Pedroooo

Pedroooo

    Advanced Member

  • Members
  • PipPipPip
  • 102 posts
  • Github:Pedro

Posted 25 March 2017 - 05:34 AM

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?







Also tagged with one or more of these keywords: npc, script

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 18 user(s)