Jump to content
  • 0

callshop npc using vending


Question

Posted

Is there a way to make NPCs use the vending skill to call shops?

Instead of clicking on the NPC you would have to click on the shop balloon, like if you were buying from another player.

Is this possible?

6 answers to this question

Recommended Posts

Posted (edited)

iirc @Epoque posted a src mod like this in eA

yep

http://www.eathena.w...howtopic=275852

but the download link is broken =/

you are such a lucky boy, I got it in my random RO related files :P

http://pastebin.com/dH1qkgdB

oh boy

thanks!

I did the changes manually, uploaded an updated diff if anyone else is interested.

Tested on r16804

vendingnpc.jpg

now im trying to make it work with clif_showvendingboard.

calling it on script vending_open doesn't seem to work, if you get too far away the board disappears.

BUILDIN_FUNC(vending_open)
{
struct npc_data* nd;
struct map_session_data* sd = script_rid2sd(st);

nullpo_retr(0, sd);

nd = script_hasdata(st, 2) ? npc_name2id(script_getstr(st, 2)) : map_id2nd(st->oid);

if( nd == NULL )
{
ShowWarning("script:vending_open: no script attached\n");
return 0;
}

clif_vending_script(sd, nd);
clif_showvendingboard(&nd->bl,"hey",0);

return 0;
}

I think the vending state on npc_data needs to be checked everytime someone is in view range, but dont know where. D=

vending.patch

Edited by Outlander

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