Jump to content

  •  

Photo

NPC Quest showevent


  • Please log in to reply
3 replies to this topic

#1 estoudegreve

estoudegreve

    Member

  • Members
  • PipPip
  • 14 posts
  • Github:estoudegreve

Posted 15 May 2017 - 01:41 AM

Hello every one, I am trying to create a quest npc.

 

This npc will show a effect like the picture, but not when the player click on it.

 

I will sho this effect when the player is not doing the quest, so the npc show it.

 

 

Attached File  post.jpg   12.92K   6 downloads


Edited by estoudegreve, 15 May 2017 - 01:41 AM.


#2 tedexx

tedexx

    Advanced Member

  • Members
  • PipPipPip
  • 67 posts

Posted 15 May 2017 - 02:42 AM

Can be done with showevent() or questinfo().

 

Using showevent you have more control of the behavior.

prontera	mapflag	loadevent
prontera,150,150,3	script	showevent	4_F_BRZ_WOMAN,{
	end;
	OnPCLoadMapEvent:
		if(strcharinfo(3) == strnpcinfo(4)) {
			.@questInProgress = 1;
			showevent(.@questInProgress ? QTYPE_QUEST : QTYPE_NONE);
		}
	end;
} 

 

If you dont succeed post it here, I 'll help you.


Edited by tedexx, 15 May 2017 - 02:50 AM.


#3 estoudegreve

estoudegreve

    Member

  • Members
  • PipPip
  • 14 posts
  • Github:estoudegreve

Posted 15 May 2017 - 03:21 AM

Can be done with showevent() or questinfo().

 

Using showevent you have more control of the behavior.

prontera	mapflag	loadevent
prontera,150,150,3	script	showevent	4_F_BRZ_WOMAN,{
	end;
	OnPCLoadMapEvent:
		if(strcharinfo(3) == strnpcinfo(4)) {
			.@questInProgress = 1;
			showevent(.@questInProgress ? QTYPE_QUEST : QTYPE_NONE);
		}
	end;
} 

 

If you dont succeed post it here, I 'll help you.

 

 

Perfect, it works, now I want to turn off it, because after choose start the quest, there is not more a new quest.



#4 tedexx

tedexx

    Advanced Member

  • Members
  • PipPipPip
  • 67 posts

Posted 15 May 2017 - 05:01 AM

You can simply do showevent(QTYPE_NONE); after you gave the quest.

If what you want is the default behavior of quests, you should use questinfo() on OnInit event.

 

*questinfo(<Quest ID>, <Icon> {, <Map Mark Color>{, <Job Class>}})

This is esentially a combination of questprogress() and showevent(). Use this only
in an OnInit label. For the Quest ID, specify the quest ID that you want
checked if it has been started yet.

For Icon, use one of the following:

No Icon		: QTYPE_NONE
! Quest Icon	: QTYPE_QUEST
? Quest Icon	: QTYPE_QUEST2
! Job Icon	: QTYPE_JOB
? Job Icon	: QTYPE_JOB2
! Event Icon	: QTYPE_EVENT
? Event Icon	: QTYPE_EVENT2
Warg		: QTYPE_WARG
Warg Face	: QTYPE_WARG2 (Only for packetver >= 20120410)

Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC,
the available color values are:

0 - No Marker
1 - Yellow Marker
2 - Green Marker
3 - Purple Marker

When a user shows up on a map, each NPC is checked for questinfo that has been set.
If questinfo is present, it will check if the quest has been started, if it has not, the bubble will appear.

Optionally, you can also specify a Job Class if the quest bubble should only appear for a certain class.

Example
	izlude,100,100,4	script	Test	844,{
		mes("[Test]");
		mes("Hello World.");
		close();

	OnInit:
		questinfo(1001, QTYPE_QUEST, 0, Job_Novice);
		end;
	}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 23 user(s)