Jump to content
  • 0

Quick way to disabled npc include the duplicate


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Quote

antgm,32,186,0	script	#Trap	HIDDEN_WARP_NPC,8,8,{
	end;

OnTouch:
	switch(rand(15)) {
		case 0:  unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
		case 1:  break;
		case 2: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
		case 3: sc_start SC_Freeze,10000,0; break;
		case 4:  unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
		case 5: sc_start SC_Sleep,10000,0; break;
		case 6: sc_start SC_Stone,10000,0; emotion ET_KIK; break;
		case 7:  unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
		case 8:  unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
		case 9: sc_start SC_Stun,10000,0; break;
		case 10: sc_start SC_Sleep,10000,0; emotion ET_KIK; break;
		case 11:  break;
		case 12: sc_start SC_Stun,10000,0; break;
		case 13: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
		default:
			unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1;
		break;
	}
	end;

}
//Top
antgm,43,223,0	duplicate(#Trap)	#Traptop1	HIDDEN_WARP_NPC,8,8
antgm,32,250,0	duplicate(#Trap)	#Traptop2	HIDDEN_WARP_NPC,8,8
antgm,30,284,0	duplicate(#Trap)	#Traptop3	HIDDEN_WARP_NPC,8,8
antgm,36,314,0	duplicate(#Trap)	#Traptop4	HIDDEN_WARP_NPC,8,8
antgm,50,354,0	duplicate(#Trap)	#Traptop5	HIDDEN_WARP_NPC,8,8
antgm,84,358,0	duplicate(#Trap)	#Traptop6	HIDDEN_WARP_NPC,8,8
antgm,128,365,0	duplicate(#Trap)	#Traptop7	HIDDEN_WARP_NPC,8,8
antgm,167,362,0	duplicate(#Trap)	#Traptop8	HIDDEN_WARP_NPC,8,8
antgm,208,353,0	duplicate(#Trap)	#Traptop9	HIDDEN_WARP_NPC,8,8
antgm,254,373,0	duplicate(#Trap)	#Traptop10	HIDDEN_WARP_NPC,8,8

 

HI, its there quikway to disabled npc included the duplicate ?
 

then use this way??

disablenpc instance_npcname("#Traptop1");
disablenpc instance_npcname("#Traptop2");

disablenpc instance_npcname("#Traptop3");
 

 

Edited by LearningRO
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

Just put // on your npc conf file.

 

before:

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

npc: npc/location/to/script.txt

 

after:

// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt

 

 

OR you can just use @unloadnpc npc/location/to/script.txt

Edited by mrfizi
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

25 minutes ago, mrfizi said:

Just put // on your npc conf file.

 

before:


// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

npc: npc/location/to/script.txt

 

after:


// --------------------------------------------------------------
// -                       Custom Scripts                       -
// --------------------------------------------------------------
//      All the custom scripts, remove the '//' to enable...     
//      Place your scripts here!

//npc: npc/location/to/script.txt

 

 

OR you can just use @unloadnpc npc/location/to/script.txt

you missunderstand what i want broo 

this for temp hide npc 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

My second option on my reply is the best answer. @unloadnpc npc/location/to/script.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

2 minutes ago, mrfizi said:

My second option on my reply is the best answer. @unloadnpc npc/location/to/script.txt

so i want to disable that npc for the moment 
ex: when i kill monster
that NPC trap will be removed for 1 minute after that will be enable again

i just want to know is there quick way then use disablenpc each line LOL

so i think you miss understand ?

 

Edited by LearningRO
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

Oh, sorry then.

try using:

hideonnpc

hideoffnpc

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

Hideonnpc npc name

Hideoffnpc npc name

Use it inside a for loop to make it easier

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

How about https://github.com/rathena/rathena/blob/c5cf2f6e42b1cb88d501e0b3e7c56e870b928209/doc/script_commands.txt#L6567


*unloadnpc "<NPC object name>";

This command will fully unload a NPC object and all of it's duplicates.

 

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...