Jump to content
  • 0

killmonster inside npc


edumander1

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  12
  • Reputation:   0
  • Joined:  09/04/23
  • Last Seen:  

I'm trying to use @killmonster2 before the npc call another monster, but doesn't working

Quote
-   script  sum_mvp -1,{
 
    onInit:
        setarray .mvps, 1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688,1708,1719,1734,1751,1768,1779,1785,1832,1871,1874,1885,1917,2022,2068;
    end;
 
    onMinute30:
        atcommand "@killmonster2";
 
        .@randIndex = rand(getarraysize(.mvps));
        .@mvpId = .mvps[.@randIndex]);
 
        monster "pay_dun04", 0, 0, "The Butcher", .@mvpId, 1;
        announce "[ The Butcher ] is inside the PvP Room looking for more victims", bc_all, 0xFF0000;
    end;
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

Hi. It's not working because the NPC doesn't know which map to use the @killmonster2.

You can put the NPC inside the map:

pay_dun04,0,0,0	script	sum_mvp	-1,{

 

or change the @killmonster2 line to:

setmapflag "pay_dun04",mf_noloot;
setmapflag "pay_dun04",mf_noexp;
killmonsterall "pay_dun04";
removemapflag "pay_dun04",mf_noloot;
removemapflag "pay_dun04",mf_noexp;

 

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...