Jump to content
  • 0
Sign in to follow this  
karazu

Warper with payment(item) and Menu

Question

Hello I found several scripts already with payment but it will only warp in 1 map

If its ok I would like to request to put menu in it.

like when u click it and u have the item it will warp you to the map.


the menu is like


prontera
payon
geffen and so on.

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Here you go! :P

prontera,150,150,0	script	Sample	100,{	if ( countitem(.item_id) < .amount ) close;	mes .n$;	mes "Hey where would you like to go?";	next;	.@s = select(implode(.Maps$, ":")) - 1;	mes .n$;	mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?";	next;	if ( select("Yes:No") - 1 ) close;	mes .n$;	mes "Bye!";	delitem .item_id, .amount;	warp strtolower(.Maps$[.@s]),0,0;	close;	OnInit:		setarray .Maps$[0],"Payon","Prontera","Geffen";		.item_id = 7227;		.amount = 5;		.n$ = "[" +strnpcinfo(1)+ "]";		end;}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

Hello, You again Patskie thank you for that. 

is it possible to put a coordinates please?

and is it possible that you will change the name for example


I will use Alias
example 

The City of Pride = prontera 150 150

The City of Genius = geffen 150 150
The City of Patskie = payon 150 150





 

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0
prontera,150,150,0	script	Sample	100,{	if ( countitem(.item_id) < .amount ) close;	mes .n$;	mes "Hey where would you like to go?";	next;	for ( .@i = 0; .@i < .size; .@i++ ) {		.@menu$ += .Desc$[.@i];		.@menu$ += ":";	}	.@s = select(.@menu$) - 1;	mes .n$;	mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?";	next;	if ( select("Yes:No") - 1 ) close;	mes .n$;	mes "Bye!";	delitem .item_id, .amount;	warp strtolower(.Maps$[.@s]),0,0;	close;	OnInit:		setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie";		setarray .Maps$[0],"payon","prontera","geffen";		.size = getarraysize(.Desc$);		.item_id = 7227;		.amount = 5;		.n$ = "[" +strnpcinfo(1)+ "]";		end;}

Share this post


Link to post
Share on other sites
  • 0

prontera,150,150,0	script	Sample	100,{	if ( countitem(.item_id) < .amount ) close;	mes .n$;	mes "Hey where would you like to go?";	next;	for ( .@i = 0; .@i < .size; .@i++ ) {		.@menu$ += .Desc$[.@i];		.@menu$ += ":";	}	.@s = select(.@menu$) - 1;	mes .n$;	mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?";	next;	if ( select("Yes:No") - 1 ) close;	mes .n$;	mes "Bye!";	delitem .item_id, .amount;	warp strtolower(.Maps$[.@s]),0,0;	close;	OnInit:		setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie";		setarray .Maps$[0],"payon","prontera","geffen";		.size = getarraysize(.Desc$);		.item_id = 7227;		.amount = 5;		.n$ = "[" +strnpcinfo(1)+ "]";		end;} 

This is good already but i want with coordinates. because if u only put prontera you will be warped randomly in prontera right?

 

if possbile with coordinates.

 

I saw a PVP warper before he did it like this.

 

 

 

prontera,147,175,5	script	Special Warper	10005,{set .@room1$,"PVP1";set .@room2$,"PVP2";set .@name$,"[Special Warper]"; //NPC Dialogue namemes .@name$;mes "Hello, I can warp you to some special area.";mes "Please choose an area do you want me to warp you.";switch(select("PVPAREA1:PVPAREA2")){case 1:	warp .@room1$,50,50;	end;case 2:	if(Class >= 0 && Class <= 4215){ //Allows Rune Knight to Mechanic, no matter if they rebirthed before or not	warp .@room2$,84,50;	end;	}} 

The problem with it is doesn't have payment, and also it has some limit according to JOB

 

 

Share this post


Link to post
Share on other sites
  • 0

Hmm. Make sure that this three arrays have same value size. If the first array have 3 values, the second and third array must have also 3 values otherwise you will receive errors :

 

setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie";setarray .Maps$[0],"payon","prontera","geffen";setarray .Coordinates$[0],"150:150","150:150","150:150";

 

@Edit : add a checkcell command because you may input an invalid coordinates and stuck those players who will use this npc

prontera,150,150,0	script	Sample	100,{    if ( countitem(.item_id) < .amount ) close;    mes .n$;    mes "Hey where would you like to go?";    next;    for ( .@i = 0; .@i < .size; .@i++ ) {        .@menu$ += .Desc$[.@i];        .@menu$ += ":";    }    .@s = select(.@menu$) - 1;    mes .n$;    mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?";    next;    if ( select("Yes:No") - 1 ) close;    delitem .item_id, .amount;	explode(.@coord$, .Coordinates$[.@s], ":");	mes .n$;	if ( checkcell(strtolower(.Maps$[.@s]), .@coord$[0], .@coord$[1], cell_chkpass) ) {		mes "Bye!";		warp strtolower(.Maps$[.@s]),atoi(.@coord$[0]),atoi(.@coord$[1]);	} else mes "Invalid coordinates";    close;	    OnInit:        setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie";        setarray .Maps$[0],"payon","prontera","geffen";		setarray .Coordinates$[0],"150:150","150:150","343:143";        .size = getarraysize(.Desc$);        .item_id = 7227;        .amount = 5;        .n$ = "[" +strnpcinfo(1)+ "]";        end;}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

Thank you your the best.

Testing it now



EDIT:

 

Hmm. Make sure that this three arrays have same value size. If the first array have 3 values, the second and third array must have also 3 values otherwise you will receive errors :

 

Last Patskie
Can you make it 2 items please?

Like it requires 2 different items  to let this NPC warp you...

Edited by karazu

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.