Jump to content
  • 0
mirabell

how to make a npc invisible to a character that has complete it

Question

9 answers to this question

Recommended Posts

  • 0

Maybe you can use OnTouch, whenever the player is close it changes the sprite.

Quote

prontera,150,150,5    script    classchange    HIDDEN_WARP_NPC,14,14,{
OnTouch:
    if ( playervar == 1)
        classchange NPCSPRITE, 0, getcharid(0);
    end;
}

That way its always invisible unless the player has a variable, didn't test it tho.

Edited by Tomahawk
  • Like 1
Link to comment
Share on other sites

  • 0

You can add a pj variable when they finish a quest like this or if you are using quest_db you can verify the progress of the quest.

prontera,156,167,4	script	QuestNpc#1	854,3,3,{
	end;
	OnTouch:
      if(Quest_Custom < 10 ){
		hideoffnpc "QuestNpc#1";
              switch(Quest_Custom){
                  case 0:
                      //do something for beginning questers
                      close2;
                      set Quest_Custom, 1;
                      end;
                  break;
                  case 1:
                  	//do something else
                    close2;
                    set Quest_Custom, 2;
                    end;
                  break;
                  .
                  .
                  .
                  default:
                  	//do something when this npc does not have an option for the level of quest the user has.
                  break;
              }
      } else {
        npctalk "Looks like you've finished all the quest, congratulations "+strcharinfo(0);
      }
	end;
	OnInit:
		hideonnpc "QuestNpc#1";
	end;
}

 

Link to comment
Share on other sites

  • 0
55 minutes ago, sader1992 said:

Moved to the right section

how is this a source mod when im asking how to do it script wise? there is hide npc commands. IM asking how to be able to hide a npc from a player when quest complete.

 

Edited by mirabell
Link to comment
Share on other sites

  • 0
28 minutes ago, mirabell said:

how is this a source mod when im asking how to do it script wise? there is hide npc commands. IM asking how to be able to hide a npc from a player when quest complete.

 

image.thumb.png.c4c8beabd5c8d9df2982ff4262566b42.png
it's impossible script wise as far as i know

so in this section , you might find the answer you seek

unless you mean something else

Edited by sader1992
Link to comment
Share on other sites

  • 0

Isn't it possible through classchange?

classchange HIDDEN_WARP_NPC, strnpcinfo(0), bc_self;

Edit: Btw I got this code from AnnieRuru's blog.

Edited by Tomahawk
  • Upvote 1
Link to comment
Share on other sites

  • 0
20 minutes ago, Tomahawk said:

Isn't it possible through classchange?

classchange HIDDEN_WARP_NPC, strnpcinfo(0), bc_self;

 

that will do

ok than , my bad , moved it back to the script section.

Edited by sader1992
Link to comment
Share on other sites

  • 0
1 hour ago, sader1992 said:

that will do

ok than , my bad , moved it back to the script section.

thanks, i basically wanted a way that didnt require crazy src edit, i should have mentions it my bad .

1 hour ago, Tomahawk said:

Isn't it possible through classchange?

classchange HIDDEN_WARP_NPC, strnpcinfo(0), bc_self;

Edit: Btw I got this code from AnnieRuru's blog.

now this one i haven't seen before. lets say i wanted to use that. is there a onlogon event i can use to make the npc hidden to a player with a variable or quest complete?

 thanks

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.