dummi3s Posted March 25, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 11/10/15 Last Seen: March 2, 2019 Share Posted March 25, 2016 Hello , how can i put this vendor control in 2 town? prontera,155,163,4 script Vending Helper 757,{ for( set .@i,1; .@i <= .count; set .@i,.@i + 1 ){ getmapxy( .@map$,.@x,.@y,1,"#vend_slot"+.@i ); if( !getareausers( .map$,.@x,.@y,.@x,.@y ) && .@x > 1 && .@y > 1 ){ set .@available,.@available + 1; set .@menu$,.@menu$ + "Slot - "+.@i+":"; }else{ set .@menu$,.@menu$ + ":"; } } if( !.@available ){ mes "Dont have any available slot."; }else if( !getskilllv("MC_VENDING") ){ mes "You dont have ^0055FFVending Skill^000000."; }else{ mes "Available Slot : "+.@available; mes "Please select a slot to vending."; set .@i,select( .@menu$ ); getmapxy( .@map$,.@x,.@y,1,"#vend_slot"+.@i ); if( .@x == 1 || .@y == 1 ){ mes "This NPC at invalid location..."; }else{ warp .@map$,.@x,.@y; hideonnpc "#vend_slot"+.@i; } } close; OnInit: sleep 1000; // Map for vending set .map$,"prontera"; setcell .map$,0,0,284,365,cell_novending,1; // x and y horizone .. setarray .x_line,151,155,159; setarray .y_line,160,156,152,148,144; set .x_line_size,getarraysize( .x_line ); set .y_line_size,getarraysize( .y_line ); set .count,1; for( set .@x,0; .@x < .x_line_size; set .@x,.@x + 1 ) for( set .@y,0; .@y < .y_line_size; set .@y,.@y + 1 ) if( checkcell( .map$,.x_line[.@x],.y_line[.@y],cell_chkpass ) ){ movenpc "#vend_slot"+.count,.x_line[.@x],.y_line[.@y]; setcell .map$,.x_line[.@x],.y_line[.@y],.x_line[.@x],.y_line[.@y],cell_novending,0; set .count,.count + 1; } npctalk "Vending Spot : "+.count; donpcevent "::OnSetup"; end; } - script vend_slot -1,{ getmapxy( .@map$,.@x,.@y,1 ); if( !getskilllv("MC_VENDING") ){ mes "You dont have ^0055FFVending Skill^000000."; }else if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){ mes "Someone already selected this spot."; }else{ mes "Spot : ^777777Available^000000"; mes "^0055FF[ Vending Area Rules ]^000000"; mes "^FF0000 ~ Use proper Shop Name.^000000"; mes "^FF0000 ~ Never sell Junk/Gifts.^000000"; mes " "; mes "^777777Player will failed to follow these will be punished.^000000"; if( select( "Select this Spot","Cancel" ) == 1 ){ warp .@map$,.@x,.@y; hideonnpc strnpcinfo(0); } } close; OnSetup: getmapxy( .@map$,.@x,.@y,1 ); set .@npcname$,strnpcinfo(0); while( .@map$ != "" ){ if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){ hideonnpc .@npcname$; }else{ hideoffnpc .@npcname$; // specialeffect 313; } sleep 5000; } end; } // Add more if needed. prontera,1,1,4 duplicate(vend_slot) #vend_slot1 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot2 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot3 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot4 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot5 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot6 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot7 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot8 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot9 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot10 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot11 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot12 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot13 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot14 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot15 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot16 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot17 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot18 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot19 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot20 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot21 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot22 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot23 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot24 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot25 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot26 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot27 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot28 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot29 858 prontera,1,1,4 duplicate(vend_slot) #vend_slot30 858 Thanks .. Quote Link to comment Share on other sites More sharing options...
0 pachupappy Posted March 25, 2016 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 145 Reputation: 14 Joined: 04/28/12 Last Seen: June 25, 2023 Share Posted March 25, 2016 just make an npc.npc/custom/vendinghelper.txt and put it to your scripts_custom.conf as well. Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted March 25, 2016 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share Posted March 25, 2016 Config the script Look for Set .Maps , Set , X and Y Coordinate . to enable add your script in your desire location and dont forget to add the path of script inside scripts_custom.conf Quote Link to comment Share on other sites More sharing options...
0 dummi3s Posted March 26, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 11/10/15 Last Seen: March 2, 2019 Author Share Posted March 26, 2016 i already put it in 1 town , i want to put it in another town as well . Quote Link to comment Share on other sites More sharing options...
0 Poring King Posted March 27, 2016 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share Posted March 27, 2016 Lol Sorry . i see ! haha my mistake do this one , but your script can't make 2 town even you do duplicate . better to create 2 same script but different map location . https://rathena.org/wiki/Basic_Scripting Sample : prontera,156,145,4 script Test NPC::test 589,{ mes "Hello, how are you?"; mes "I am fine, how are you?"; menu "I am doing okay!",-,"Not doing too good",bad; mes "That's good, I'm glad to hear that"; close; bad: mes "Awww, that makes me a bit ^FF0000sad^000000. Sorry to hear that."; next; mes "Would you like some zeny to help yourself feel better?"; next; menu "Sure, give it to me!",L_zeny,"Naw, No zeny for me",-; close; L_Zeny: mes "I can only give you zeny if you have 10,000 or less."; if (Zeny > 10000) goto toomuch; mes "You have 10,000 zeny or less, I see."; set Zeny,Zeny+10000; next; mes "Hope you feel better!"; close; toomuch: mes "You have over 10,000 zeny, you must feel really good about yourself!"; close; } lhz_dun01,157,285,4 duplicate(test) Test NPC 859 hu_fild05,186,210,4 duplicate(test) Test NPC 859 yuno_fild07,221,179,4 duplicate(test) Test NPC 859 tha_scene01,139,194,1 duplicate(test) Test NPC 859 Quote Link to comment Share on other sites More sharing options...
Question
dummi3s
Hello , how can i put this vendor control in 2 town?
Thanks ..
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.