Jump to content
  • 0

Difficulties with Vending Control Script by Emistry's


nekoyarou

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   1
  • Joined:  08/28/16
  • Last Seen:  

Hi all,

im having trouble with Emistry's script for vending control, the cell that's supposed to allow me for vending, it didnt allow me to do so, here's the script that i've edited

OnInit:
	sleep 1000;
	// Map for vending
	.map$ = strnpcinfo(4);
	setcell .map$, 0, 0, 300, 300, cell_novending, 1;

	// x and y horizone ..
	setarray .x_line, 142, 146, 150, 154, 158, 162, 166;
	setarray .y_line, 230, 228, 226, 224, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196, 194, 192;

	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;
}

everytime i go to the spot for vending and using vending skill, it gives me this error :

image.png.92d15d04a737708afa95bb40794046b3.png

can anyone point me to where i do wrong?.

Thanks in advance~

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

If you haven't tried yet, make sure the vending spots are more than 3/4 cells away to avoid getting this error. (AFAIK)..
Else, change the settings in conf/battle/player.conf
 

// Minimum distance a vending/chat room must be from a NPC in order to be placed.
// Default: 3 (0: disabled).
min_npc_vendchat_distance: 3

Edit:

I think this is a mapflag thing, make sure vending is allowed on this map.

Edited by pajodex
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   1
  • Joined:  08/28/16
  • Last Seen:  

3 minutes ago, pajodex said:

If you haven't tried yet, make sure the vending spots are more than 3/4 cells away to avoid getting this error. (AFAIK)..
Else, change the settings in conf/battle/player.conf
 

// Minimum distance a vending/chat room must be from a NPC in order to be placed.
// Default: 3 (0: disabled).
min_npc_vendchat_distance: 3

PS:

I think this is a mapflag thing, make sure vending is allowed on this map.

Thanks for the pointer, turns out it was an issue with the vending distance, my configured y axis for vending is only 1 cell, hence why vending creation is disabled.

now that i reduced the vending distance to 1, it works flawlessly!.

Many thanks for helping @pajodex!.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/13/23
  • Last Seen:  

You can try to increase the distance between the vending spot and the NPC by changing the values in the setarray .y_line command in your script.

splatoon 3

Edited by Brekke
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   1
  • Joined:  08/28/16
  • Last Seen:  

15 hours ago, Brekke said:

You can try to increase the distance between the vending spot and the NPC by changing the values in the setarray .y_line command in your script.

splatoon 3

yes, but if i do that, then the number of spaces available for vending would be too little, also i want it to be as many as possible and as close as possible, so reducing the minimum vending distance in conf/battle/player.conf and reducing the number on the script below to 1 is what works for me as @pajodex mentioned.

min_npc_vendchat_distance: 3

Thanks for replying tho 😄

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