Thread: Lootshare problem

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Lootshare problem 
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    Hi,

    I've added a lootshare system but it prints totally different outcome of the drop, no idea why.



    Code:
    	public void getLootShareMessage(Client c, int item, int amount) {
    		sendLootShareMessage(c.clanId, Misc.optimizeText(c.playerName) + " received: " + amount + " " + Misc.optimizeText(engine.model.items.Item.getItemName(item)) + ".");
    	}
    And in the npd dropping:

    Code:
    						PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId);
    						if (c.clanId >= 0)
    							PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME??
    						c.sendMessage(engine.model.items.Item.getItemName(NPC_DROPS[npc][1]) + NPC_DROPS[npc][2]); //REAL OUTCOME
    any idea?
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  2. #2  
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    bump
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  3. #3  
    Time to sleep for another couple years.

    Dizzy King's Avatar
    Join Date
    Jul 2012
    Age
    25
    Posts
    752
    Thanks given
    258
    Thanks received
    117
    Rep Power
    103
    Because you don't have it to drop a sertent item it picks at random, change your code around a bit.
    Attached image

    Reply With Quote  
     

  4. #4  
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    Quote Originally Posted by Project-xv2 View Post
    Because you don't have it to drop a sertent item it picks at random, change your code around a bit.
    Code:
    			for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){
    				if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) {
    					if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) {
    						if (c.clanId >= 0)
    							PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME??
    						PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId);
    						c.sendMessage(engine.model.items.Item.getItemName(NPC_DROPS[npc][1]) + NPC_DROPS[npc][2]); //REAL OUTCOME
    						break;
    					}
    				}
    			}
    of course i made it drop an item. The code was just a part of the dropping.
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  5. #5  
    Time to sleep for another couple years.

    Dizzy King's Avatar
    Join Date
    Jul 2012
    Age
    25
    Posts
    752
    Thanks given
    258
    Thanks received
    117
    Rep Power
    103
    Quote Originally Posted by ReRune View Post
    Code:
    			for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){
    				if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) {
    					if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) {
    						if (c.clanId >= 0)
    							PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME??
    						PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId);
    						c.sendMessage(engine.model.items.Item.getItemName(NPC_DROPS[npc][1]) + NPC_DROPS[npc][2]); //REAL OUTCOME
    						break;
    					}
    				}
    			}
    of course i made it drop an item. The code was just a part of the dropping.

    I'm talking about actually making it drop the item's you want...
    Attached image

    Reply With Quote  
     

  6. #6  
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    Quote Originally Posted by Project-xv2 View Post
    I'm talking about actually making it drop the item's you want...
    It does drop the items i want. But when i send a clan message it shows something completeley different.
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  7. #7  
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    Come on..?
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    May 2007
    Posts
    2,690
    Thanks given
    115
    Thanks received
    45
    Rep Power
    0
    Haven't really messed with 317's lately, I may be wrong but try this:

    Code:
    for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){
    				if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) {
    					if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) {
    						if (c.clanId >= 0)
    							PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME??
    						PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId);
    						break;
    					}
    				}
    			}
    Reply With Quote  
     

  9. #9  
    Registered Member DUGI's Avatar
    Join Date
    Jan 2013
    Age
    28
    Posts
    191
    Thanks given
    31
    Thanks received
    31
    Rep Power
    41
    Quote Originally Posted by Angel View Post
    Haven't really messed with 317's lately, I may be wrong but try this:

    Code:
    for(npc = 0; npc < NPCDrops.NPC_DROPS.length; npc++){
    				if(npcs[i].npcType == NPCDrops.NPC_DROPS[npc][0]) {
    					if(Misc.random(NPCDrops.NPC_DROPS[npc][3]) == 0) {
    						if (c.clanId >= 0)
    							PrimaryGameEngine.clanChat.getLootShareMessage(c, NPCDrops.NPC_DROPS[npc][1], NPCDrops.NPC_DROPS[npc][2]); //BUGGED OUTCOME??
    						PrimaryGameEngine.itemHandler.createGroundItem(c, NPCDrops.NPC_DROPS[npc][1], npcs[i].absX, npcs[i].absY, NPCDrops.NPC_DROPS[npc][2], c.playerId);
    						break;
    					}
    				}
    			}
    still the same..
    "In every life there is trouble, when you worry about it you make it double." - Bobby McFerrin
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    May 2007
    Posts
    2,690
    Thanks given
    115
    Thanks received
    45
    Rep Power
    0
    Quote Originally Posted by ReRune View Post
    still the same..
    I'll look at it tomorrow if still didn't get it fixed.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. [FIXED]Lootshare problem [PI]
    By Luigii in forum Help
    Replies: 5
    Last Post: 09-08-2013, 09:53 AM
  2. Lootshare problem? [PI]
    By joopz23 in forum Help
    Replies: 6
    Last Post: 08-22-2012, 06:43 PM
  3. [PI]317, Lootshare problem [REP+]
    By Tired in forum Help
    Replies: 2
    Last Post: 07-26-2011, 07:56 AM
  4. Fixing Log In\Out Problem
    By _Fear in forum Tutorials
    Replies: 11
    Last Post: 04-14-2010, 10:35 PM
  5. Backround problem , ;dd.
    By Kevvah . in forum General
    Replies: 0
    Last Post: 07-10-2007, 11:41 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
  •