skuray Posted December 14, 2018 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 29 Reputation: 1 Joined: 07/16/18 Last Seen: February 25, 2022 Share Posted December 14, 2018 (edited) I can not use sales through npc, but around of the npc i can. my script prontera,156,116,4 script Vending Helper 4_F_JPN2,{ mes "["+ strnpcinfo(0) +"]"; if ( !getskilllv( 41 ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } mes "Select a slot and start vending."; while ( true ) { .@menu$ = .@currentpage ? "Previous Page:" : ":"; .@pageindex = .@currentpage * .slotperpage; for ( .@i = 0; .@i < .slotperpage && .@pageindex + .@i < .count; ++.@i ) { if ( !getmapxy( .@map$, .@x, .@y, UNITTYPE_NPC, "#vend_slot"+( .@pageindex + .@i ) ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^FF0000[Unavailable]^000000:"; else .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^00CC00[Available]^000000:"; } if ( .@currentpage != .maxpage ) .@menu$ = .@menu$ + "Next Page"; .@pick = select( .@menu$ ) -1; if ( !.@pick ) { --.@currentpage; } else if ( .@pick == .slotperpage +1 ) { ++.@currentpage; } else break; } .@s = .@currentpage * .slotperpage + .@pick -1 ; if ( !getmapxy( .@map$, .@x, .@y, UNITTYPE_NPC, "#vend_slot"+ .@s ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) { mes " "; mes "This slot is ^FF0000[UnAvailable]^000000."; close; } warp .@map$, .@x, .@y; hideonnpc "#vend_slot"+ .@s; donpcevent "#vend_slot"+ .@s +"::OnCheckAvailable"; end; OnInit: setbattleflag "min_npc_vendchat_distance", 0; // ======================= Configuration HERE ============================= .map$ = "prontera"; // map setarray .@x, 150,153,156,159,162; // x coordinates setarray .@y, 108,105,102,99,96,93,90,87,84,81,78,75,72,69,66; // y coordinates .slotperpage = 20; // display how many slots per page (prevent making the menu too long) freeloop true; setcell .map$, 0,0, 500,500, cell_novending, false; .@x_size = getarraysize( .@x ); .@y_size = getarraysize( .@y ); for ( .@i = 0; .@i < .@y_size; ++.@i ) { for ( .@j = 0; .@j < .@x_size; ++.@j ) { if ( checkcell( .map$, .@x[.@j], .@y[.@i], cell_chkpass ) ) { movenpc "#vend_slot"+ .count, .@x[.@j], .@y[.@i]; setcell .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i], cell_novending, true; if ( getareausers( .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i] ) ) { hideonnpc "#vend_slot"+ .count; donpcevent "#vend_slot"+ .count +"::OnCheckAvailable"; } ++.count; } } } .maxpage = .count / .slotperpage + ( .count % .slotperpage > 0 ) -1; // debugmes "Vendor NPC needed -> "+ .count; end; } - script vend_slot -1,{ mes "[Vending Slot]"; if ( !getskilllv( 41 ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } getmapxy .@map$, .@x, .@y, UNITTYPE_NPC; if ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) { mes "Someone already using this slot"; close; } unitwalk getcharid(3), .@x, .@y; mes "Spot : ^777777Available^000000"; mes "^0055FF[ Vending Area Rules ]^000000"; mes "^FF0000 ~ Use proper Shop Name.^000000"; mes "^777777Player who failed to follow these rules will be punished.^000000"; hideonnpc strnpcinfo(0); donpcevent strnpcinfo(0)+"::OnCheckAvailable"; close; OnCheckAvailable: sleep 10000; getmapxy .@map$, .@x, .@y, UNITTYPE_NPC; while ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) sleep 10000; hideoffnpc strnpcinfo(0); end; } // Add more if needed. prontera,0,0,4 duplicate(vend_slot) #vend_slot0 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot1 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot2 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot3 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot4 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot5 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot6 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot7 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot8 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot9 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot10 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot11 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot12 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot13 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot14 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot15 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot16 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot17 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot18 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot19 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot20 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot21 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot22 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot23 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot24 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot25 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot26 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot27 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot28 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot29 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot30 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot31 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot32 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot33 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot34 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot35 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot36 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot37 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot38 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot39 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot40 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot41 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot42 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot43 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot44 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot45 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot46 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot47 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot48 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot49 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot50 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot51 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot52 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot53 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot54 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot55 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot56 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot57 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot58 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot59 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot60 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot61 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot62 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot63 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot64 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot65 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot66 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot67 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot68 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot69 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot70 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot71 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot72 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot73 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot74 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot75 4_BULLETIN_BOARD2 thank u Edited December 14, 2018 by skuray Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted December 20, 2018 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:32 PM Share Posted December 20, 2018 disable this settings to enable vending near npc conf/battle/player.conf#L174-L176 Quote Link to comment Share on other sites More sharing options...
0 Chaoszinho Posted February 10, 2019 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 17 Reputation: 1 Joined: 11/29/16 Last Seen: April 2 Share Posted February 10, 2019 i have the same issue it dosent work for me @Emistry Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted February 10, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 10, 2019 just test again ... I see this script already has this line ... OnInit: setbattleflag "min_npc_vendchat_distance", 0; theoretically, just make the script like this ... should work on rathena //===== rAthena Script ===================================== //= Vendor Control //===== By: ================================================ //= Original by Emistry //= Rewrite by AnnieRuru //===== Current Version: =================================== //= 2.1r //===== Compatible With: =================================== //= rAthena 2019-2-10 //===== Description: ======================================= //= Vendors only vend on certain coordinate, looks tidy :P //===== Topic ============================================== //= https://rathena.org/board/topic/117737-error-vendinghelp/ //===== Additional Comments: =============================== //= Revert back to use warp //========================================================== prontera,156,178,4 script Vending Helper 4_F_JPN2,{ mes "["+ strnpcinfo(NPC_NAME_VISIBLE) +"]"; if ( !getskilllv( "MC_VENDING" ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } mes "Select a slot and start vending."; while ( true ) { .@menu$ = .@currentpage ? "Previous Page:" : ":"; .@pageindex = .@currentpage * .slotperpage; for ( .@i = 0; .@i < .slotperpage && .@pageindex + .@i < .count; ++.@i ) { if ( !getmapxy( .@map$, .@x, .@y, BL_NPC, "#vend_slot"+( .@pageindex + .@i ) ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^FF0000[Unavailable]^000000:"; else .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^00CC00[Available]^000000:"; } if ( .@currentpage != .maxpage ) .@menu$ = .@menu$ + "Next Page"; .@pick = select( .@menu$ ) -1; if ( !.@pick ) { --.@currentpage; } else if ( .@pick == .slotperpage +1 ) { ++.@currentpage; } else break; } .@s = .@currentpage * .slotperpage + .@pick -1 ; if ( !getmapxy( .@map$, .@x, .@y, BL_NPC, "#vend_slot"+ .@s ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) { mes " "; mes "This slot is ^FF0000[UnAvailable]^000000."; close; } warp .@map$, .@x, .@y; hideonnpc "#vend_slot"+ .@s; donpcevent "#vend_slot"+ .@s +"::OnCheckAvailable"; end; OnInit: setbattleflag "min_npc_vendchat_distance", 0; // ======================= Configuration HERE ============================= .map$ = "prontera"; // map setarray .@x, 150,153,156,159,162; // x coordinates setarray .@y, 175,172,169,166,163,160,157,154,151,148,145,142,139,136,133; // y coordinates .slotperpage = 20; // display how many slots per page (prevent making the menu too long) freeloop true; setcell .map$, 0,0, 500,500, cell_novending, true; .@x_size = getarraysize( .@x ); .@y_size = getarraysize( .@y ); for ( .@i = 0; .@i < .@y_size; ++.@i ) { for ( .@j = 0; .@j < .@x_size; ++.@j ) { if ( checkcell( .map$, .@x[.@j], .@y[.@i], cell_chkpass ) ) { movenpc "#vend_slot"+ .count, .@x[.@j], .@y[.@i]; setcell .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i], cell_novending, false; if ( getareausers( .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i] ) ) { hideonnpc "#vend_slot"+ .count; donpcevent "#vend_slot"+ .count +"::OnCheckAvailable"; } ++.count; } } } .maxpage = .count / .slotperpage + ( .count % .slotperpage > 0 ) -1; // debugmes "Vendor NPC needed -> "+ .count; end; } - script vend_slot FAKE_NPC,{ mes "[Vending Slot]"; if ( !getskilllv( "MC_VENDING" ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } getmapxy .@map$, .@x, .@y, BL_NPC; if ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) { mes "Someone already using this slot"; close; } // unitwalk getcharid(3), .@x, .@y; warp strcharinfo(3), .@x, .@y; mes "Spot : ^777777Available^000000"; mes "^0055FF[ Vending Area Rules ]^000000"; mes "^FF0000 ~ Use proper Shop Name.^000000"; mes "^777777Player who failed to follow these rules will be punished.^000000"; hideonnpc strnpcinfo(0); donpcevent strnpcinfo(0)+"::OnCheckAvailable"; close; OnCheckAvailable: sleep 10000; getmapxy .@map$, .@x, .@y, BL_NPC; while ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) sleep 10000; hideoffnpc strnpcinfo(0); end; } // Add more if needed. prontera,0,0,4 duplicate(vend_slot) #vend_slot0 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot1 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot2 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot3 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot4 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot5 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot6 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot7 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot8 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot9 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot10 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot11 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot12 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot13 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot14 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot15 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot16 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot17 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot18 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot19 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot20 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot21 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot22 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot23 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot24 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot25 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot26 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot27 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot28 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot29 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot30 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot31 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot32 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot33 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot34 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot35 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot36 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot37 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot38 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot39 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot40 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot41 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot42 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot43 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot44 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot45 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot46 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot47 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot48 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot49 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot50 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot51 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot52 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot53 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot54 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot55 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot56 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot57 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot58 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot59 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot60 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot61 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot62 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot63 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot64 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot65 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot66 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot67 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot68 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot69 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot70 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot71 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot72 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot73 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot74 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot75 4_BULLETIN_BOARD2 Quote Link to comment Share on other sites More sharing options...
0 TrustGTX Posted February 10, 2019 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 45 Reputation: 1 Joined: 10/09/18 Last Seen: February 4, 2020 Share Posted February 10, 2019 (edited) 1 hour ago, AnnieRuru said: just test again ... I see this script already has this line ... OnInit: setbattleflag "min_npc_vendchat_distance", 0; theoretically, just make the script like this ... should work on rathena //===== rAthena Script ===================================== //= Vendor Control //===== By: ================================================ //= Original by Emistry //= Rewrite by AnnieRuru //===== Current Version: =================================== //= 2.1r //===== Compatible With: =================================== //= rAthena 2019-2-10 //===== Description: ======================================= //= Vendors only vend on certain coordinate, looks tidy :P //===== Topic ============================================== //= https://rathena.org/board/topic/117737-error-vendinghelp/ //===== Additional Comments: =============================== //= Revert back to use warp //========================================================== prontera,156,178,4 script Vending Helper 4_F_JPN2,{ mes "["+ strnpcinfo(NPC_NAME_VISIBLE) +"]"; if ( !getskilllv( "MC_VENDING" ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } mes "Select a slot and start vending."; while ( true ) { .@menu$ = .@currentpage ? "Previous Page:" : ":"; .@pageindex = .@currentpage * .slotperpage; for ( .@i = 0; .@i < .slotperpage && .@pageindex + .@i < .count; ++.@i ) { if ( !getmapxy( .@map$, .@x, .@y, BL_NPC, "#vend_slot"+( .@pageindex + .@i ) ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^FF0000[Unavailable]^000000:"; else .@menu$ += "Slot No."+( .@pageindex + .@i +1 )+" - ^00CC00[Available]^000000:"; } if ( .@currentpage != .maxpage ) .@menu$ = .@menu$ + "Next Page"; .@pick = select( .@menu$ ) -1; if ( !.@pick ) { --.@currentpage; } else if ( .@pick == .slotperpage +1 ) { ++.@currentpage; } else break; } .@s = .@currentpage * .slotperpage + .@pick -1 ; if ( !getmapxy( .@map$, .@x, .@y, BL_NPC, "#vend_slot"+ .@s ) && getareausers( .map$, .@x, .@y, .@x, .@y ) ) { mes " "; mes "This slot is ^FF0000[UnAvailable]^000000."; close; } warp .@map$, .@x, .@y; hideonnpc "#vend_slot"+ .@s; donpcevent "#vend_slot"+ .@s +"::OnCheckAvailable"; end; OnInit: setbattleflag "min_npc_vendchat_distance", 0; // ======================= Configuration HERE ============================= .map$ = "prontera"; // map setarray .@x, 150,153,156,159,162; // x coordinates setarray .@y, 175,172,169,166,163,160,157,154,151,148,145,142,139,136,133; // y coordinates .slotperpage = 20; // display how many slots per page (prevent making the menu too long) freeloop true; setcell .map$, 0,0, 500,500, cell_novending, true; .@x_size = getarraysize( .@x ); .@y_size = getarraysize( .@y ); for ( .@i = 0; .@i < .@y_size; ++.@i ) { for ( .@j = 0; .@j < .@x_size; ++.@j ) { if ( checkcell( .map$, .@x[.@j], .@y[.@i], cell_chkpass ) ) { movenpc "#vend_slot"+ .count, .@x[.@j], .@y[.@i]; setcell .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i], cell_novending, false; if ( getareausers( .map$, .@x[.@j], .@y[.@i], .@x[.@j], .@y[.@i] ) ) { hideonnpc "#vend_slot"+ .count; donpcevent "#vend_slot"+ .count +"::OnCheckAvailable"; } ++.count; } } } .maxpage = .count / .slotperpage + ( .count % .slotperpage > 0 ) -1; // debugmes "Vendor NPC needed -> "+ .count; end; } - script vend_slot FAKE_NPC,{ mes "[Vending Slot]"; if ( !getskilllv( "MC_VENDING" ) ) { mes "You dont have ^0055FFVending Skill^000000."; close; } getmapxy .@map$, .@x, .@y, BL_NPC; if ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) { mes "Someone already using this slot"; close; } // unitwalk getcharid(3), .@x, .@y; warp strcharinfo(3), .@x, .@y; mes "Spot : ^777777Available^000000"; mes "^0055FF[ Vending Area Rules ]^000000"; mes "^FF0000 ~ Use proper Shop Name.^000000"; mes "^777777Player who failed to follow these rules will be punished.^000000"; hideonnpc strnpcinfo(0); donpcevent strnpcinfo(0)+"::OnCheckAvailable"; close; OnCheckAvailable: sleep 10000; getmapxy .@map$, .@x, .@y, BL_NPC; while ( getareausers( .@map$, .@x, .@y, .@x, .@y ) ) sleep 10000; hideoffnpc strnpcinfo(0); end; } // Add more if needed. prontera,0,0,4 duplicate(vend_slot) #vend_slot0 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot1 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot2 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot3 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot4 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot5 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot6 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot7 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot8 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot9 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot10 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot11 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot12 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot13 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot14 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot15 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot16 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot17 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot18 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot19 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot20 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot21 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot22 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot23 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot24 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot25 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot26 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot27 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot28 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot29 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot30 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot31 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot32 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot33 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot34 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot35 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot36 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot37 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot38 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot39 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot40 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot41 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot42 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot43 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot44 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot45 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot46 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot47 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot48 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot49 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot50 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot51 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot52 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot53 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot54 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot55 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot56 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot57 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot58 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot59 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot60 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot61 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot62 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot63 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot64 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot65 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot66 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot67 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot68 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot69 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot70 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot71 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot72 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot73 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot74 4_BULLETIN_BOARD2 prontera,0,0,4 duplicate(vend_slot) #vend_slot75 4_BULLETIN_BOARD2 i got this error .. the vending slots are not showing Edited February 10, 2019 by TrustGTX Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted February 10, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted February 10, 2019 (edited) 39 minutes ago, TrustGTX said: i got this error .. the vending slots are not showing [Warning]: script: buildin_getmapxy: Invalid type 128. [Debug]: Source (NPC): #vend_slot0 at prontera (150,175) [Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list! A test that run on december version of rathena shows that you haven't updated your rathena installation at all if you gotten that type of error! that means getmapxy update is not included and the format has changed. But of course if you don't want to update then change every BL_NPC back to UNITTYPE_NPC Edited February 10, 2019 by utofaery Quote Link to comment Share on other sites More sharing options...
0 TrustGTX Posted February 11, 2019 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 45 Reputation: 1 Joined: 10/09/18 Last Seen: February 4, 2020 Share Posted February 11, 2019 8 hours ago, utofaery said: A test that run on december version of rathena shows that you haven't updated your rathena installation at all if you gotten that type of error! that means getmapxy update is not included and the format has changed. But of course if you don't want to update then change every BL_NPC back to UNITTYPE_NPC sir where do i need to change this. where i can found this? Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted February 11, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted February 11, 2019 3 hours ago, TrustGTX said: You gonna open text editor ( notepad plus or any text editor ) and use ctrl + F ( or find ) BL_NPC and change it to UNITTYPE_NPC unless you can't do that ... https://pastebin.com/ND9wTJYw copy directly I hate codebox very slow loading on my snail speed internet connection Quote Link to comment Share on other sites More sharing options...
0 PsyOps Posted April 14, 2019 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: Saturday at 08:56 PM Share Posted April 14, 2019 Having the same issue with the script. My rathena was from february 2019. Error - script: movenpc : NPC with ID '#vendslot69' was not found. Basically i used AnnieRuru's script above 1st. - Did not work for me 2nd i used AnnieRuru's script with utofaery's suggestion. - Did not work for me as well Script here.https://pastebin.com/TfwUTJzB Quote Link to comment Share on other sites More sharing options...
0 PsyOps Posted April 30, 2019 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: Saturday at 08:56 PM Share Posted April 30, 2019 Any solution to this? as i am getting the same error: script: movenpc: NPC with ID '#vend_slot74' was not found! Quote Link to comment Share on other sites More sharing options...
0 katrashi Posted August 30, 2019 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 0 Joined: 08/16/19 Last Seen: September 11, 2019 Share Posted August 30, 2019 Player.conf is 0 and I still can't open a store for sale Quote Link to comment Share on other sites More sharing options...
Question
skuray
I can not use sales through npc, but around of the npc i can.



my script
Edited by skuraythank u
Link to comment
Share on other sites
10 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.