Jump to content
  • 0

Paying warper


eboni001

Question


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

hello guys does somebody can make or share an npc like this?:

 

i have 4 special maps to lvl up called, lvl_dun01,02,03,04

 

what i want is to restrict this maps to regular use, i want this npc give permision if you want to have regular acces to this maps you have to pay 1m to can warp to lvl_dun01 to 03, but if you want access to all dungeons lvl_dun01 to lvl_dun04 you have to pay 10m, after pay for this service you will can warp normally like any other map forever, but i want players have to buy same permision for each character to can enter this maps, thank you hope somebody help me with thiw npc ^_^.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Here you go. Only edits I made to your request was, Instead of making it 1M to gain access to Levels 1->3, and then 10M for access to Levels 1->4. I made it so, In TOTAL they will have to pay 10M zeny to gain access to Levels 1->4. In other words, if they bought 1->3 for 1M, then they only need pay 9M more to gain access to 1->4. To make it fair.

prontera,150,150,4	script	Level Dungeons	123,{
	set .@npc$,"[^0000FF Level Dungeons Warper ^000000]";
	if(!V1_3 && !V1_4)
	{mes .@npc$;
	 mes "You currently do not have access to these dungeons. You must pay an entrance fee, do you wish to continue?";
	 mes "Prices:";
	 mes "Access to Dungeons 1->3 = 1,000,000z";
	 mes "Access to Dungeons 1->4 = 10,000000z";
	 menu "Access to Dungeons 1->3",i1_3,"Access to Dungeons 1->4",i1_4,"Cancel",iClose;}
	if(V1_4)
		{menu "Level 1:Level 2:Level 3:Level 4",-;
		 warp "lvl_dun0"+ @menu +"",0,0;
		 end;}
	menu "Level 1:Level 2:Level 3",-,"Access to Dungeons 1->4",i1_4,"Cancel",iClose;
	warp "lvl_dun0"+ @menu +"",0,0;
	end;
	
	i1_3:
	next;
	if(zeny < 1000000){mes "Sorry, but you don't have enough zeny. You need 1,000,000z"; close;}
	set zeny,zeny-1000000;
	set V1_3,1;
	mes "Thank you. You now have access to Level Dungeons 1->3.";
	close;
	i1_4:
	next;
	if(zeny < (10000000 - V1_3) ){mes "Sorry, but you don't have enough zeny. You need "+ (10000000 - V1_3) +"z"; close;}
	set zeny,zeny - (10000000 - V1_3);
	set V1_4,1;
	mes "Thank you. You now have access to Level Dungeons 1->4.";
	close;
	iClose:
	close;
	
	OnInit:
	bindatcmd "@warp",strnpcinfo(3)+"::OnWarpCmd";
	end;
	
	OnWarpCmd:
	if(compare(.@atcmd_parameters$[0],"lvl_dun0") && V1_3 && .@atcmd_parameters$[0] != "lvl_dun04")
		{warp .@atcmd_parapmeters$[0],0,0; end;}
	if(compare(.@atcmd_parameters$[0],"lvl_dun0") && V1_4)
		{warp .@atcmd_parapmeters$[0],0,0; end;}
	if(compare(.@atcmd_parameters$[0],"lvl_dun0") && !V1_3 && !V1_4){end;}
	warp .@atcmd_parameters$[0],atoi(.@atcmd_parameters$[1]),atoi(.@atcmd_parameters$[2]);
	end;
}

 

Edited by GmOcean
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

Here you go. Only edits I made to your request was, Instead of making it 1M to gain access to Levels 1->3, and then 10M for access to Levels 1->4. I made it so, In TOTAL they will have to pay 10M zeny to gain access to Levels 1->4. In other words, if they bought 1->3 for 1M, then they only need pay 9M more to gain access to 1->4. To make it fair.

prontera,150,150,4	script	Level Dungeons	123,{
	set .@npc$,"[^0000FF Level Dungeons Warper ^000000]";
	if(!V1_3 && !V1_4)
	{mes .@npc$;
	 mes "You currently do not have access to these dungeons. You must pay an entrance fee, do you wish to continue?";
	 mes "Prices:";
	 mes "Access to Dungeons 1->3 = 1,000,000z";
	 mes "Access to Dungeons 1->4 = 10,000000z";
	 menu "Access to Dungeons 1->3",i1_3,"Access to Dungeons 1->4",i1_4,"Cancel",iClose;}
	if(V1_4)
		{menu "Level 1:Level 2:Level 3:Level 4",-;
		 warp "lvl_dun0"+ @menu +"",0,0;
		 end;}
	menu "Level 1:Level 2:Level 3",-,"Access to Dungeons 1->4",i1_4,"Cancel",iClose;
	warp "lvl_dun0"+ @menu +"",0,0;
	end;
	
	i1_3:
	next;
	if(zeny < 1000000){mes "Sorry, but you don't have enough zeny. You need 1,000,000z"; close;}
	set zeny,zeny-1000000;
	set V1_3,1;
	mes "Thank you. You now have access to Level Dungeons 1->3.";
	close;
	i1_4:
	next;
	if(zeny < (10000000 - V1_3) ){mes "Sorry, but you don't have enough zeny. You need "+ (10000000 - V1_3) +"z"; close;}
	set zeny,zeny - (10000000 - V1_3);
	set V1_4,1;
	mes "Thank you. You now have access to Level Dungeons 1->4.";
	close;
	iClose:
	close;
}

ty npc is working good, but there is any way how to make npc grant acces to can warp to the dungeon after buy the permit? i mean after you pay for the permit you can just type @warp lvl_dun01 and dont need to use the npc to get warped on there.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I've edited my first post, to modify the script to fit your new needs. The only issue I see arising from it, is if a player tries to put in coordinates and happens to place a LETTER instead of a NUMBER. While, this won't crash your server, it'll just show an error. Aside from that, it will act as needed. Allowing for @warp to those locations, ONLY if they have bought the permit.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

I've edited my first post, to modify the script to fit your new needs. The only issue I see arising from it, is if a player tries to put in coordinates and happens to place a LETTER instead of a NUMBER. While, this won't crash your server, it'll just show an error. Aside from that, it will act as needed. Allowing for @warp to those locations, ONLY if they have bought the permit.

 

Sorry late respond, i have en error in line #38:

	bindatcmd "@warp",strnpcinfo(3)::"OnWarpCmd";

how to fix this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Oh, sorry, change that to the below. I must have typed that part in wrong.

bindatcmd "@warp",strnpcinfo(3)+"::OnWarpCmd";
Edited by Lionhardt
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...