Thread: Flasks to Vials (Bens Release)

Results 1 to 6 of 6
  1. #1 Flasks to Vials (Bens Release) 
    Donator


    Join Date
    Jul 2013
    Posts
    1,233
    Thanks given
    1
    Thanks received
    493
    Rep Power
    0
    Such fixed on ma own like usual...
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Nov 2013
    Posts
    58
    Thanks given
    5
    Thanks received
    7
    Rep Power
    0
    Need this
    Reply With Quote  
     

  3. #3  
    L O S E Y O U R S E L F
    Format's Avatar
    Join Date
    Aug 2013
    Posts
    2,311
    Thanks given
    1,131
    Thanks received
    1,461
    Rep Power
    5000
    Quote Originally Posted by 423 Million View Post
    Hello I have a problem that has been bothering me for sometime now and I actually managed to get around to fixing it just that every method i try seems to fail.

    So the title states my problem and basically what happens in more detail is that when a player drink the flask completely, it is not crumbling as it will just spawn in an empty vial. I looked at the coding from ben which he did add in twice for the flask to be destroyed after 0 doses left.

    1. Firstly, if you managed to fix it, fix it again.
    2. Handle this in where-ever your inventory options are handled
    3.
    Code:
    if (itemId == id) {
    player.getInventory().remove(itemid, 1);
    player.getInventory().addItem(vial, 1);
    }


    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Jul 2013
    Posts
    1,233
    Thanks given
    1
    Thanks received
    493
    Rep Power
    0
    Quote Originally Posted by Format View Post
    1. Firstly, if you managed to fix it, fix it again.
    2. Handle this in where-ever your inventory options are handled
    3.
    Code:
    if (itemId == id) {
    player.getInventory().remove(itemid, 1);
    player.getInventory().addItem(vial, 1);
    }
    U know if i were to do that vials would no longer be obtainable right.
    Thats why i didnt remove the vials from the code...
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2013
    Posts
    214
    Thanks given
    55
    Thanks received
    7
    Rep Power
    12
    Add my skype: mass_fraschetti
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    May 2011
    Posts
    1,077
    Thanks given
    236
    Thanks received
    230
    Rep Power
    0
    Code tags please.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Comp cape GFX [addon to my last release]
    By Miner in forum Tutorials
    Replies: 4
    Last Post: 08-13-2011, 06:00 AM
  2. Realting Skill--to--pk OFFICIAL RELEASE!
    By g s t a r in forum Downloads
    Replies: 35
    Last Post: 06-18-2011, 12:32 AM
  3. Replies: 74
    Last Post: 08-09-2010, 08:01 PM
  4. SMF to Server Integration. Released!!
    By James in forum Tutorials
    Replies: 21
    Last Post: 07-08-2008, 02:57 PM
  5. Release: Prayers to A Fallen God
    By Fallen Azn SinZ in forum Graphics
    Replies: 33
    Last Post: 02-01-2008, 08:54 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •