Jump to content
  • 0

I'm looking for Vending control working with last version of rAthena


Question

Posted

Hello, I searched for Vending control and I got this one 

But it has too much bugs

Any working script?

14 answers to this question

Recommended Posts

  • 0
Posted (edited)
On 3/15/2021 at 6:36 AM, Diana said:

Hello, I searched for Vending control and I got this one 

But it has too much bugs

Any working script?

No bug on that script. Just add your x and y coordinate.

Example:

x1/y1     x2      x3  

y2

y3

y4

	// x and y horizone ..
	setarray .x_line, x1,x2,x3;
	setarray .y_line, y1,y2,y3,y4;

 

Hope this can help you to set the vending location/coordinate.

Edited by mrfizi
  • 0
Posted

Thank you guys for replying, it works but I can't set the x and y successfully

as example here is the points I want, and want it to move down tell the gate to prt_fild08

How can I set it?

image.thumb.png.81516c3a8dd465e9ab6cd5db3e2795bf.png

points are: 163,111

152,111

155,111

and move down 2 steps and add new point to sale?

  • 0
Posted
19 hours ago, Diana said:

points are: 163,111

152,111

155,111

and move down 2 steps and add new point to sale?

Try this:

	// x and y horizone ..
	setarray .x_line, 152,155,163;
	setarray .y_line, 111,109,106,103,101,99,96,93,91,89;

Add more x or y line if you want more.

and don't forget to add more duplicate npc vend_slot

prontera, 1, 1, 4	duplicate(vend_slot)	#vend_slot1	858

For my example, x * y = 30 NPC. So i need to duplicate 30 npc:

Spoiler

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

Hope this can help you.

  • Upvote 1
  • 0
Posted

Hello,

 

Sorry to open this topic, im using the same script but somehow i cant open a Vending. And i dont get an error console

image.png.8bb9bc0a35259dbf846f91b33c8c7407.png

In the corret cell when i press Vending, nothing happens

image.png.97e7f98ee3b5b74ab4c0857406f1390a.png

When i use the Vending in the incorrect cell, 

image.png.3ba9d23850b8ff16e950c81575d7150d.png

If i use Vending in another City, it works

image.png.51f711a4399b8a45f2ea4393ef5b791a.png

  • 0
Posted (edited)

npc/mapflag/novending.txt (if you have this on your server)

remove novending mapflag from your map. Example; Prontera:

//prontera	mapflag	novending

 

Then open player.conf
https://github.com/rathena/rathena/blob/master/conf/battle/player.conf#L184

change 3 to 2.

min_npc_vendchat_distance: 2


The distance is depend on your vending distance. Set it 2 or below depend on your setting.

Edited by mrfizi
add more info
  • Like 1
  • 0
Posted
5 hours ago, mrfizi said:

npc/mapflag/novending.txt (if you have this on your server)

remove novending mapflag from your map. Example; Prontera:

//prontera	mapflag	novending

 

Then open player.conf
https://github.com/rathena/rathena/blob/master/conf/battle/player.conf#L184

change 3 to 2.

min_npc_vendchat_distance: 2


The distance is depend on your vending distance. Set it 2 or below depend on your setting.

Hey,

 

About the mapflag, i dont have one on the server and if i remove the script from the .conf file, i can use Vending.

 

Anyway, I made the changes you recommended (i change and recompile everything) and even reconfigured the cells, leaving two in between each Vending Spot and it still doesn't work for me.

 

image.png.52c519c5c72abc715e912d2226956add.png

  • 0
Posted

I managed to fix it,

I had not realized that the cells had to be both horizontal and vertical and I only had the horizontal ones, configuring the vertical ones solved it.

 

Thanks! @mrfizi

  • 0
Posted

You're welcome.

Btw, you don't need to recompile your server if you're just configure your conf file and script.

use @reloadscript npc/filedirectory/yourscript.txt

and for conf file just use @reloadbattleconf

But, if it involve mapflag setting, I recommended you to restart your server.

  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...