way to make a truly one of a kind item?

Results 1 to 10 of 10
  1. #1
    Member zeldasmokes is offline
    MemberRank
    May 2014 Join Date
    47Posts

    way to make a truly one of a kind item?

    so.. i'm working on something.




    i'm trying to come up with a way that only one of each of these items may exist.
    I mean, i wanted to do something like make all mobs have a very small chance of dropping any one of them, but if someone on the server currently posses one, then that one can't drop, y'know?

    i'v been racking my head on this, and can't come up with any ideas.

    Does anyone know of a way to do something like this?

    p.s is there a more efficient way to set all mobs up for having a chance to drop an item?
    (like when retail did for example a haloween event, and all mobs had a chance to drop candy.)
    cus i just do it one, by one in mysql....


    -ty4reading
    Last edited by zeldasmokes; 16-02-15 at 02:14 PM.


  2. #2
    Newbie Worker88 is offline
    MemberRank
    Apr 2014 Join Date
    6Posts

    Re: way to make a truly one of a kind item?

    p.s is there a more efficient way to set all mobs up for having a chance to drop an item?
    (like when retail did for example a haloween event, and all mobs had a chance to drop candy.)
    cus i just do it one, by one in mysql...
    Look if you have something like drop_data_global in your database and add it there.

    i'm trying to come up with a way that only one of each of these items may exist.
    I mean, i wanted to do something like make all mobs have a very small chance of dropping any one of them, but if someone on the server currently posses one, then that one can't drop, y'know?
    I'm not sure exactly how a solution to this would look, but you could go to your source where the method is that spawns the drop, and add a check in there to see if the id is already in the iteminventory database (independent of char).

  3. #3
    Member zeldasmokes is offline
    MemberRank
    May 2014 Join Date
    47Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by Worker88 View Post
    Look if you have something like drop_data_global in your database and add it there.



    I'm not sure exactly how a solution to this would look, but you could go to your source where the method is that spawns the drop, and add a check in there to see if the id is already in the iteminventory database (independent of char).
    hm, thankyou for the quick reply dude, i probably should have mentioned that i'm using msv63, using xiuzsource, i can't seem to find drop_data_global. =-/
    sorry i'm a bit scruby, if this also applies to xiuzsource would you mind pointing me out drop_data_global 's location?

    edit: just thought of something maybe useful for getting this done, i could copy a mob in my database to a new code, but leave him as he is besides adding one of the dragonballs as a drop.

    do this for 7 mobs, then spawn one of each of them in the world (probably with their copied from originals).

    hmmmm
    just feels sloppy that way tho.

    maybe does anyone maybe know where to modify the timer that handles how long a dropped item sits on the floor until it disappears?
    Last edited by zeldasmokes; 17-02-15 at 05:49 AM.

  4. #4
    Grand Master kevintjuh93 is offline
    Grand MasterRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: way to make a truly one of a kind item?

    Best way of doing this is quite simple.

    1. When you start the server, check the inventory table to see if the item is in anyones inventory.
    2. If not, you can allow it to drop.
    3. If picked up, don't allow it to drop.
    4. If dropped, allow it to be picked up.

    Did I forget anything?

  5. #5
    Interesting... SharpAceX is offline
    Grand MasterRank
    Oct 2008 Join Date
    2,011Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by kevintjuh93 View Post
    Best way of doing this is quite simple.

    1. When you start the server, check the inventory table to see if the item is in anyones inventory.
    2. If not, you can allow it to drop.
    3. If picked up, don't allow it to drop.
    4. If dropped, allow it to be picked up.

    Did I forget anything?
    I don't think the checks need to have anything to do with drops/pick ups specifically. There are other methods of getting rid of the items (like selling them, if they're sellable), deleting the character, etc.. Putting it in the storage should also be handled properly, same with hired merchants, etc.

    Probably not as simple as described here for a full and correct implementation.

  6. #6
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by SharpAceX View Post
    I don't think the checks need to have anything to do with drops/pick ups specifically. There are other methods of getting rid of the items (like selling them, if they're sellable), deleting the character, etc.. Putting it in the storage should also be handled properly, same with hired merchants, etc.

    Probably not as simple as described here for a full and correct implementation.
    The way the server handles inventoryitems is through "inventorytype". If the server has that itemid within inventorytype of -1 ~ 6, then they have it in any of their equip or equipped inventories, their storage, a merchant, cash storage, etc. Only thing we need to check for is if the item gets removed, which you could do a check when physically removing/clearing that item and then allow pickup. That, or whenever the server restarts the check will allow pickup.

  7. #7
    Member zeldasmokes is offline
    MemberRank
    May 2014 Join Date
    47Posts

    Re: way to make a truly one of a kind item?

    you guys are great for giving so much feedback so fast, i think i have this mostly all worked out now thanks to everyone, last question tho...

    how exactly would i set it to drop from all mobs?
    like i was saying earlier, the only way i know how to do such a thing would be editing in the mob drop table in my sql, one by one....

    what exactly would be the easiest procedure to make an item drop-able by ALL mobs?

  8. #8
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by zeldasmokes View Post
    you guys are great for giving so much feedback so fast, i think i have this mostly all worked out now thanks to everyone, last question tho...

    how exactly would i set it to drop from all mobs?
    like i was saying earlier, the only way i know how to do such a thing would be editing in the mob drop table in my sql, one by one....

    what exactly would be the easiest procedure to make an item drop-able by ALL mobs?
    well in some sources you have a GLOBAL drop table.. if you dont, you can code a custom table and load it in dropFromMonster. Otherwise, just edit dropFromMonster in MapleMap and copy a spawnItemDrop or add to the current list of drops (something like toDrop.add(itemId)).

  9. #9
    Member zeldasmokes is offline
    MemberRank
    May 2014 Join Date
    47Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by chunkarama View Post
    well in some sources you have a GLOBAL drop table.. if you dont, you can code a custom table and load it in dropFromMonster. Otherwise, just edit dropFromMonster in MapleMap and copy a spawnItemDrop or add to the current list of drops (something like toDrop.add(itemId)).
    I think i would have to have table since i would be removing the drop every time somebody finds it...
    i've been reading about maplemap method for ages now...
    seems awful.

    so how exactly would i go about making a global mob table in mysql? it sounds like the greatest table ever i must have it ;3

  10. #10
    Interesting... SharpAceX is offline
    Grand MasterRank
    Oct 2008 Join Date
    2,011Posts

    Re: way to make a truly one of a kind item?

    Quote Originally Posted by zeldasmokes View Post
    I think i would have to have table since i would be removing the drop every time somebody finds it...
    i've been reading about maplemap method for ages now...
    seems awful.

    so how exactly would i go about making a global mob table in mysql? it sounds like the greatest table ever i must have it ;3
    It's just a normal table like any other. Either rip it from Moople or make it yourself. Add the columns you think you're going to need then look at loadFromDB and saveToDB to get an idea about how data is loaded and saved to the table.



Advertisement