Thread: Fixed

Results 1 to 2 of 2
  1. #1 Fixed 
    Banned
    Join Date
    Sep 2013
    Posts
    146
    Thanks given
    72
    Thanks received
    25
    Rep Power
    0
    Fixed ty
    Reply With Quote  
     

  2. #2  
    What's a sundial in the shade?

    Lumiere's Avatar
    Join Date
    May 2013
    Age
    24
    Posts
    538
    Thanks given
    216
    Thanks received
    98
    Rep Power
    113
    Should be relatively simple.
    Code:
    if(packet.getOpcode() == MAGIC_ON_GROUNDITEMS) {
    	final int itemY = packet.readLEShort();
    	final int itemId = packet.readShort();
    	final int itemX = packet.readLEShort();
    	final int spellId = packet.readUnsignedShortA();
    	final MagicSpells spell = MagicSpells.forSpellId(spellId);
    	
    	final Item item = new Item(itemId);
    	final GroundItem groundItem = GroundItemManager.getGroundItem(player, item, new Position(itemX, itemY));
    	final boolean hasRunes = player.getInventory().contains(new Item [] { new Item(LAW_RUNE_ID), new Item(OTHER_RUNE_ID) });
    	
    	if(spell == null)
    		return;
    	
    	player.getMovementQueue().reset();
    	
    	if (itemId > 0 && spell == MagicSpells.TELEGRAB && hasRunes) {
    		
    		//Do stuff.
    		//Remove the ground item, and so on.
    		
    		player.getInventory().delete(new Item(LAW_RUNE_ID, AMOUNT)).delete(new Item(OTHER_RUNE_ID, AMOUNT));
    		player.getInventory().add(new Item(item.getId(), item.getAmount()));
    		GroundItemManager.remove(groundItem, true);
    	}
    }

    Spoiler for Revy is perfect:
    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. Help telegrab 667 rep+ and thanks!
    By nusenia in forum Help
    Replies: 1
    Last Post: 11-27-2013, 01:14 AM
  2. [P]Telegrab help
    By Richie in forum Help
    Replies: 2
    Last Post: 09-13-2010, 10:17 PM
  3. Need gfx help?
    By Beh3moth2 in forum General
    Replies: 1
    Last Post: 04-03-2007, 11:50 AM
  4. Need help again
    By Zane in forum Showcase
    Replies: 4
    Last Post: 04-02-2007, 09:11 PM
  5. Need help choosing sig
    By Zane in forum Showcase
    Replies: 7
    Last Post: 04-02-2007, 03:14 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •