Jump to content
  • 0

Need a modification of this


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Source: https://rathena.org/board/topic/91886-requesting-a-restock-npc/

Script I need to be modified:

 

prontera,159,184,5    script    kjhfksjdfhs    100,{
    if ( ( .@count = .cold_medicine - countitem( "Cold_Medicine" ) ) > 0 ) {
        if ( checkweight( "Cold_Medicine", .@count ) )
            getitem "Cold_Medicine", .@count;
        else
            dispbottom "You can't carry enough Cold Medicine";
    }
    if ( ( .@count = .halohalo - countitem( "Halohalo" ) ) > 0 ) {
        if ( checkweight( "Halohalo", .@count ) )
            getitem "Halohalo", .@count;
        else
            dispbottom "You can't carry enough Halohalo";
    }
    end;
OnInit:
    .cold_medicine = 500;
    .halohalo = 10;
}

My idea:

Available Item in the list: @potlist - use this to open menu for player to select which pot to use and how many

HP Recovery
1. WoE White Potion

2. Light White Potion
3. Mastela Fruit

SP Recovery
1. WoE Blue Potion

2. Light Blue Potion

Player can only select one item for hp recovery, and same with sp recovery. After that player will input how many he wants example;

Player selects WoE White Potion, 500 pcs .. automatically he will get 500 white potions into his inventory and his zeny will be reduced according to the buying price of the woe white pots..

Goal of this NPC:

1. Make players BUY pots automatically by just talking to the npc. They just need to set it up once using @potlist

 

--

I hope someone will notice this, this will be very useful and i think lots of people can benefit if this somehow gets finished.

 

Edited by PandaRapesHamster
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Testing it right now. OMG, Didn't know it would be that long, thank you so much El Dragon. Will report back if I found anything wrong with the script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Hi El Dragon, it works, but not the way I needed it, I tweaked it a bit and is working quite okay now, thank you for the base script. I'll post it here when it is done.

  • Upvote 1
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...