Jump to content
  • 0

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


Diana

Question


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.03
  • Content Count:  188
  • Reputation:   3
  • Joined:  12/17/16
  • Last Seen:  

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

But it has too much bugs

Any working script?

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

Console Errors?
did you use cartesian coordinate plane when adding it to x and y axis?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  337
  • Reputation:   64
  • Joined:  10/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.05
  • Content Count:  478
  • Reputation:   14
  • Joined:  11/30/17
  • Last Seen:  

can you give us a more in depth examples?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.03
  • Content Count:  188
  • Reputation:   3
  • Joined:  12/17/16
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  337
  • Reputation:   64
  • Joined:  10/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.03
  • Content Count:  188
  • Reputation:   3
  • Joined:  12/17/16
  • Last Seen:  

@mrfizi That example helped me!! 

Thank you ❤️ 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  337
  • Reputation:   64
  • Joined:  10/30/12
  • Last Seen:  

check your novending mapflag.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

5 hours ago, mrfizi said:

check your novending mapflag.

Is at default setup

image.png.8768b7242827237e99b55e1ee1805bed.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  337
  • Reputation:   64
  • Joined:  10/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  337
  • Reputation:   64
  • Joined:  10/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

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

Variables are the building blocks of all programming languages; they are locations where data is kept. 

retro bowl

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