Jump to content
  • 0
llchrisll

[SOLVED] enablenpc/disablenpc

Question

Hi guys,

momentally I'm working on an script which handles your NPC loadings (like the scripts_custom.conf),

which allows you to load/unload & enalbe/disable your npcs as you like via NPC.

(If you think that's a stupid idea, then I agree, I'm just scripting and testing in order to learn ohmy.png)

My question is now with the "#hidden" part of an NPC Name.

If I put something like this:

enablenpc "#test";

So would any script which holds the "#test" be enabled or not?

If this doesn't work I still have a another solution so no worries biggrin.png.

Thx and Regards,

Chris

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

enablenpc "#test";

^ This would only enable the npc named "#test". For example:

prontera,155,188,0	script	#test	910,{
dispbottom "Hello world";
}

(it would not enable another npc named "something#test" )

Are you going to have multiple NPCs, and you want to enable/disable them all?

Maybe put OnEnable and OnDisable labels in all of them:

OnEnable:
enablenpc strnpcinfo(3);
end;
OnDisable:
disablenpc strnpcinfo(3);
end;

then use donpcevent "::OnEnable"; because that does trigger all npcs with the given label.

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

Important Information

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