Jump to content
  • 0

Npc warp with required items


skymia

Question


  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

How to make a npc quest warper to warp in a specific dungeon with require some items?

Example: npc location prontera if you click the npc it will ask a item before warping in that map and if the item not complete npc will tell lack of items come back later if you give me the items i need

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

39 minutes ago, skymia said:

How to make a npc quest warper to warp in a specific dungeon with require some items?

Example: npc location prontera if you click the npc it will ask a item before warping in that map and if the item not complete npc will tell lack of items come back later if you give me the items i need

just example


prontera,155,183,4	script	Warper	723,{

set .TicketID,501;	

mes "Hi which dungeon do you want to go?";
mes "but you must give me "+getitemname(.TicketID)+".";
switch(select("Use service.","cancel.")) {
	case 1:
			next;
			mes "Pick your destination.";
			next;
			.@menu$ = "";
			for (.@i = 0; .@i < getarraysize(.maps$); .@i++) {
				.@menu$ = .@menu$ + .maps$[.@i*2] + ":";
			}
			.@menu$ = .@menu$ + ":cancel";
			.@sel = select(.@menu$)-1;
			if (.@sel-1 != .@i) {
				callsub(OnWarp,.@sel*2);
				break;
			}
			next;
			mes .name$;
			mes "ok, se you.";
		case 2: goto(OnCancel); break;
	}
	end;
	
	OnWarp:
		if( countitem(.TicketID) < 1 ){
		mes "You don't have item "+getitemname(.TicketID)+" to use this service.";
		end;
		}
			.@i = getarg(0);
			next;
			mes .name$;
			mes "See You next time.";
			close2;
			warp .maps$[.@i+1],.xy[.@i],.xy[.@i+1];
			end;

	OnCancel:
		next;
		mes .name$;
		mes "See You next time.";
		close;

	OnInit:
		.name$ = "[Kafra]";
		// Warp List
		setarray .maps$[0],"pay_dun02","pay_dun02",
					"gl_sew03","gl_sew03",
					"alde_dun02","alde_dun02",
					"mag_dun01","mag_dun01",
					"gefenia01","gefenia01",
					"thor_v01","thor_v01",
					"mosk_dun01","mosk_dun01",
					"Gunung Krakatau","dew_dun01",
					"bra_dun01","bra_dun01";
		setarray .xy[0],146,130,
					179,286,
					116,179,
					119,72,
					46,105,
					18,231,
					189,48,
					292,160,
					81,51;
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

13 hours ago, hendra814 said:

just example



prontera,155,183,4	script	Warper	723,{

set .TicketID,501;	

mes "Hi which dungeon do you want to go?";
mes "but you must give me "+getitemname(.TicketID)+".";
switch(select("Use service.","cancel.")) {
	case 1:
			next;
			mes "Pick your destination.";
			next;
			.@menu$ = "";
			for (.@i = 0; .@i < getarraysize(.maps$); .@i++) {
				.@menu$ = .@menu$ + .maps$[.@i*2] + ":";
			}
			.@menu$ = .@menu$ + ":cancel";
			.@sel = select(.@menu$)-1;
			if (.@sel-1 != .@i) {
				callsub(OnWarp,.@sel*2);
				break;
			}
			next;
			mes .name$;
			mes "ok, se you.";
		case 2: goto(OnCancel); break;
	}
	end;
	
	OnWarp:
		if( countitem(.TicketID) < 1 ){
		mes "You don't have item "+getitemname(.TicketID)+" to use this service.";
		end;
		}
			.@i = getarg(0);
			next;
			mes .name$;
			mes "See You next time.";
			close2;
			warp .maps$[.@i+1],.xy[.@i],.xy[.@i+1];
			end;

	OnCancel:
		next;
		mes .name$;
		mes "See You next time.";
		close;

	OnInit:
		.name$ = "[Kafra]";
		// Warp List
		setarray .maps$[0],"pay_dun02","pay_dun02",
					"gl_sew03","gl_sew03",
					"alde_dun02","alde_dun02",
					"mag_dun01","mag_dun01",
					"gefenia01","gefenia01",
					"thor_v01","thor_v01",
					"mosk_dun01","mosk_dun01",
					"Gunung Krakatau","dew_dun01",
					"bra_dun01","bra_dun01";
		setarray .xy[0],146,130,
					179,286,
					116,179,
					119,72,
					46,105,
					18,231,
					189,48,
					292,160,
					81,51;
		end;
}

 

what if multiple and amount of item need for requirements?

and i want to warp in thanatos dungeon

Edited by skymia
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

20 hours ago, skymia said:

what if multiple and amount of item need for requirements?

and i want to warp in thanatos dungeon

here

prontera,155,183,4	script	Warper	723,{

set .TicketID,501;
set .TicketQT,2;

mes "Hi which dungeon do you want to go?";
mes "but you must give me "+getitemname(.TicketID)+".";
switch(select("Use service.","cancel.")) {
	case 1:
			next;
			mes "Pick your destination.";
			next;
			.@menu$ = "";
			for (.@i = 0; .@i < getarraysize(.maps$); .@i++) {
				.@menu$ = .@menu$ + .maps$[.@i*2] + ":";
			}
			.@menu$ = .@menu$ + ":cancel";
			.@sel = select(.@menu$)-1;
			if (.@sel-1 != .@i) {
				callsub(OnWarp,.@sel*2);
				break;
			}
			next;
			mes .name$;
			mes "ok, se you.";
		case 2: goto(OnCancel); break;
	}
	end;
	
	OnWarp:
		if( countitem(.TicketID) < 1 ){
		mes "You don't have item "+getitemname(.TicketID)+" to use this service.";
		end;
		}
			.@i = getarg(0);
			next;
			mes .name$;
			mes "See You next time.";
			close2;
			delitem .TicketID,.TicketQT;
			warp .maps$[.@i+1],.xy[.@i],.xy[.@i+1];
			end;

	OnCancel:
		next;
		mes .name$;
		mes "See You next time.";
		close;

	OnInit:
		.name$ = "[Kafra]";
		// Warp List
		setarray .maps$[0],"pay_dun02","pay_dun02",
					"gl_sew03","gl_sew03",
					"alde_dun02","alde_dun02",
					"mag_dun01","mag_dun01",
					"gefenia01","gefenia01",
					"thor_v01","thor_v01",
					"mosk_dun01","mosk_dun01",
					"Gunung Krakatau","dew_dun01",
					"bra_dun01","bra_dun01",
					"Thanatos_dun","tha_t";
		setarray .xy[0],146,130,
					179,286,
					116,179,
					119,72,
					46,105,
					18,231,
					189,48,
					292,160,
					81,51,
					150,39;
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

2 hours ago, hendra814 said:

set .TicketID,501; set .TicketQT,2;

in this line can i make like this?

set .TicketID,501,502,503;
set .TicketQT,2,2,2;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 minute ago, skymia said:

in this line can i make like this?


set .TicketID,501,502,503;
set .TicketQT,2,2,2;

user arry if you want like that

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

1 minute ago, hendra814 said:

user arry if you want like that

what do you mean user array?

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

5 minutes ago, skymia said:

what do you mean user array?

 

like this

setarray .@itemid1,18971,18972,18973,18974,18983,18976,18977,18978,18979,18980,18982,18983,18984;//items require

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

1 minute ago, hendra814 said:

like this

setarray .@itemid1,18971,18972,18973,18974,18983,18976,18977,18978,18979,18980,18982,18983,18984;//items require

set .TicketID,501,502,503;
set .TicketQT,2,2,2;

to

setarray .@itemid1,501,502,503;

setarray .@amountid,2,2,2;

just like this?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 minute ago, skymia said:

set .TicketID,501,502,503;
set .TicketQT,2,2,2;

to

setarray .@itemid1,501,502,503;

setarray .@amountid,2,2,2;

just like this?

yup,

but must change the script., if you want use array,

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