Jump to content
  • 0
Sign in to follow this  
ThyroDree

Request NPC Script

Question

Can i request npc script that the npc requires/checks an item to go inside the map to start hunting. Like NPC Requires : Old Pick(Inventory Etc,.) and Alice Doll(Wearing) to Go Inside the map.

 

Please Help.

THANKS in ADVANCE :)

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

It works fine, but won't delete your pick. Here's a version that does:

 

 

-	script	Sample	-1,{	 OnPCLoadMapEvent:        getmapxy(.@map$, .@x, .@y, 0);		        if (.@map$ == "guild_vs3") {            if (!countitem(7318) || getequipid(1) != 5137) {                message strcharinfo(0),"You need to have an Alice Doll equipped and 1 Old Pick to proceed!";				                sleep2 1000;                warp "SavePoint", 0, 0;            }						delitem 7318, 1;			message strcharinfo(0), "1 Old Pick has been deleted from your inventory.";        }		        end;} guild_vs3	mapflag	loadevent

Share this post


Link to post
Share on other sites
  • 0
if ( countitem(7318) && getequipid(1) == 5137 ) {    // allow them to go to the map}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

 

if ( countitem(7318) && getequipid(1) == 5137 ) {    // allow them to go to the map}

can you make example npc script allows to go inside guild_vs3 but need to wear a Alice Doll and Needs an Old Pick. 

 

Sorry. Newbie :(

Share this post


Link to post
Share on other sites
  • 0
prontera,150,150,0	script	Sample	100,{	if ( countitem(7318) && getequipid(1) == 5137 ) {		// allow them to go to the map		warp "guild_vs3",0,0;		end;	}}

 

-	script	Sample	-1,{	OnPCLoadMapEvent:		getmapxy(.@map$,.@x,.@y,0);		if ( .@map$ == "guild_vs3" ) {			if ( !countitem(7318) || getequipid(1) != 5137 ) {				message strcharinfo(0),"You need to have alice doll and old pick";				sleep2 2000;				warp "SavePoint",0,0;			}		}		end;}guild_vs3	mapflag	loadevent

 

1st script is for warper

2nd script is a checker

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

 

prontera,150,150,0	script	Sample	100,{	if ( countitem(7318) && getequipid(1) == 5137 ) {		// allow them to go to the map		warp "guild_vs3",0,0;		end;	}}

THANKS! :) I'll try this. but how can i add if a player talks to npc and don't have the required items, the npc says: You Need Alice Doll and Old Pick to Go inside. 1x Old Pick Item will removed by the npc, because used it to go into guild_vs3. but Alice Doll remains.

Edited by venomxxvii

Share this post


Link to post
Share on other sites
  • 0

 

Add this line before warping them to the map:

delitem 7318, 1;

how can i use that script ?  :(  i don't know how  please help [Newbie]

Share this post


Link to post
Share on other sites
  • 0
prontera,150,150,0    script    Sample    100,{    if ( countitem(7318) && getequipid(1) == 5137 ) {		// allow them to go to the map		delitem 7318, 1;		warp "guild_vs3",0,0;		end;    }}

Share this post


Link to post
Share on other sites
  • 0

 

prontera,150,150,0    script    Sample    100,{    if ( countitem(7318) && getequipid(1) == 5137 ) {		// allow them to go to the map		delitem 7318, 1;		warp "guild_vs3",0,0;		end;    }}

then what is this sir?

- script Sample -1,{

OnPCLoadMapEvent:

getmapxy(.@map$,.@x,.@y,0);

if ( .@map$ == "guild_vs3" ) {

if ( !countitem(7318) || getequipid(1) != 5137 ) {

message strcharinfo(0),"You need to have alice doll and old pick";

sleep2 2000;

warp "SavePoint",0,0;

}

}

end;

}

guild_vs3 mapflag loadevent

Share this post


Link to post
Share on other sites
  • 0

That kicks you out of the map "guild_vs3" and sends you to your save point if you don't have item 7318 in your inventory or item 5137 equipped. I recommend you use the other script; don't use both.

Share this post


Link to post
Share on other sites
  • 0

That kicks you out of the map "guild_vs3" and sends you to your save point if you don't have item 7318 in your inventory or item 5137 equipped. I recommend you use the other script; don't use both.

how can i make the script checker work?

Share this post


Link to post
Share on other sites
  • 0

It works fine, but won't delete your pick. Here's a version that does:

 

 

-	script	Sample	-1,{	 OnPCLoadMapEvent:        getmapxy(.@map$, .@x, .@y, 0);		        if (.@map$ == "guild_vs3") {            if (!countitem(7318) || getequipid(1) != 5137) {                message strcharinfo(0),"You need to have an Alice Doll equipped and 1 Old Pick to proceed!";				                sleep2 1000;                warp "SavePoint", 0, 0;            }						delitem 7318, 1;			message strcharinfo(0), "1 Old Pick has been deleted from your inventory.";        }		        end;} guild_vs3	mapflag	loadevent

Done! THANKS! Can you teach me how to add timer? like you can only stay inside  for 10mins

Share this post


Link to post
Share on other sites
  • 0

Change :

sleep2 1000; 

to :

sleep2 600000;

If you want them to stay for 10 minutes

Edited by Patskie

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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