Jump to content
  • 0

NPC Warp Agent


ZelosAvalon

Question


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

I am looking for a script where when a player attempts to teleport to a map which needs quest to access. The player can not teleport for there, and a message appears saying: You are not authorized to enter this map.

 

 anyone know where I can see the ID of the quests?

 

atm i'm try to configure npc for teleport to mid_camp, but first u need to finish the quest "onward to the new world quest"

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

-	script	quest_block	-1,{
OnPCLoadMapEvent:
	.@map$ = strcharinfo(3);
	while( .@i++<.len )
		if( compare(.map_name$[.@i],.@map$) )
			if( checkquest(.quest_id[.@i])!=2 ) {
				message strcharinfo(0), "You are not authorized to enter this map.";
				warp "prontera",100,100;
			}
	end;
	
OnInit:
	setarray .quest_id[1],  16146;
	setarray .map_name$[1], "lhz_dun03";
	.len = getarraysize(.map_name$);
	while( .@i++<.len )
		setmapflag .map_name$[.@i], mf_loadevent;
}

You can also look in quest_db.txt in your server files under db folder it's a little easier because you don't have to extract your data.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   2
  • Joined:  05/23/12
  • Last Seen:  

Maybe you can use the quest system

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  179
  • Reputation:   17
  • Joined:  04/24/14
  • Last Seen:  

You can manually remove all those maps which require quests(Wounded Morroc, Nydhogg, Manuk, Splendide, New World all that) just by editing your current Warp Agent script which warps you to all those maps.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

Maybe you can use the quest system

but how i can use it on script ? can u give me an example ? 

 

i use this npc

and how i can know QUESTS ID ?

warper.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  179
  • Reputation:   17
  • Joined:  04/24/14
  • Last Seen:  

search for questid2display.txt in your grf

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

-	script	quest_block	-1,{
OnPCLoadMapEvent:
	.@map$ = strcharinfo(3);
	while( .@i++<.len )
		if( compare(.map_name$[.@i],.@map$) )
			if( checkquest(.quest_id[.@i])!=2 ) {
				message strcharinfo(0), "You are not authorized to enter this map.";
				warp "prontera",100,100;
			}
	end;
	
OnInit:
	setarray .quest_id[1],  16146;
	setarray .map_name$[1], "lhz_dun03";
	.len = getarraysize(.map_name$);
	while( .@i++<.len )
		setmapflag .map_name$[.@i], mf_loadevent;
}

You can also look in quest_db.txt in your server files under db folder it's a little easier because you don't have to extract your data.

 

 

Thanks, working now =)

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