Results 1 to 8 of 8
  1. #1
    mezamog's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    AMURICA
    Posts
    133
    Reputation
    10
    Thanks
    48
    My Mood
    Amazed

    Untiered Item Loot Notification - Relay Script

    Thanks to this Thread,I was able to edit the file and add all the codes for UT items. This is only for people that know how to use Realm Relay. All this does is when you get a UT bag drop it says it over the bag. It's useful if you are still in combat and you want to know whats in the bag. Hope you enjoy!

     
    // utnotif.js

    var ID_MOVE = $.findPacketId("MOVE");
    var ID_UPDATE = $.findPacketId("UPDATE");
    var ID_NEW_TICK = $.findPacketId("NEW_TICK");
    var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
    var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");

    var player_id = -1;
    var playerLocation = null;
    var lootbags = {};
    var lootbaglocs = {};
    var send_notif = true;

    var tier = 11; // Minimum tier of items to be notifi'ied

    var desirables = [
    0xc01, // Demon Blade
    0xa03, // Crystal Sword
    0xc05, // Ancient Stone Sword
    0xcdb, // Pirate King's Cutlass
    0xcdf, // Doctor Swordsworth
    0xc70, // Golden Ankh
    0xc71, // Eye of Osiris
    0xc72, // Pharaoh's Mask
    0xc73, // Golden Cockle
    0xc74, // Golden Conch
    0xc75, // Golden Horn Conch
    0xc78, // Golden Femur
    0xc79, // Golden Ribcage
    0xc7a, // Golden Skull
    0xc7e, // Golden Chalice
    0xc7d, // Pearl Necklace
    0xc7f, // Ruby Gemstone
    0xc7b, // Golden Candelabra
    0xc7c, // Holy Cross
    0xc77, // Golden Bolt
    0xc76, // Golden Nut
    0x722, // Wine Cellar Incantation
    0xc0a, // Dirk of Cronus
    0xc29, // Spirit Dagger
    0xced, // Sunshine Shiv
    0xc02, // Doom Bow
    0xc10, // Coral Bow
    0xcde, // Leaf Bow
    0xcec, // Robobow
    0xc03, // Staff of Extreme Prejudice
    0xcea, // KoalaPOW
    0xc04, // Wand of the Bulwark
    0xb3f, // Crystal Wand
    0xceb, // Spicy Wand of Spice
    0xcdc, // Doku No Ken
    0xcee, // Arbiters Wrath
    0xa5a, // Cloak of the Planewalker
    0xc07, // Quiver of Thunder
    0xc09, // Tome of Purification
    0xc1e, // Tome of Holy Protection
    0xc08, // Helm of the Juggernaut
    0xc0f, // Shield of Ogmur
    0xc06, // Seal of Blasphemous Prayer
    0xc0b, // Orb of Conflict
    0xc2a, // Ghostly Prism
    0xc61, // Candy-Coated Armor
    0xba2, // Ring of the Pyramid
    0xba0, // Ring of the Sphinx
    0xba1, // Ring of the Nile
    0xb3e, // Amulet of Resurrection
    0xbab, // The Forgotten Crown
    0xbad, // Bracer of the Guardian
    0xbac, // The Twilight Gemstone
    0xb41, // Tablet of the King's Avatar
    0xc22, // Bone Dagger
    0xc15, // Staff of the Crystal Serpent
    0xc1d, // St. Abraham's Wand
    0xc33, // Conducting Wand
    0x221c, // Skull-splitter Sword
    0xc18, // Coral Silk Armor
    0xc28, // Spectral Cloth Armor
    0xc1f, // Chasuble of Holy Light
    0xc14, // Robe of the Tlatoani
    0xc32, // Robe of the Mad Scientist
    0xc6e, // Resurrected Warrior's Armor
    0xc6d, // Plague Poison
    0xc16, // Cracked Crystal Skull
    0xc1c, // Coral Venom Trap
    0xc30, // Scepter of Fulmination
    0xc13, // Coral Ring
    0xc20, // Ring of Divine Faith
    0xc27, // Captain's Ring
    0xc31, // Experimental Ring
    0xc5f, // Candy Ring
    0x709, // Poison Fang Dagger
    0xa4b, // Sprite Wand
    0xa3e, // Snake Skin Armor
    0xa40, // Snake Skin Shield
    0x708, // Spider's Eye Ring
    0xa41, // Snake Eye Ring
    0xc17, // Crystal Bone Ring
    ];

    function onClientPacket(event) {
    var packet = event.getPacket();
    switch (packet.id()) {
    case ID_MOVE: {
    var time = packet.time;
    playerLocation = packet.newPosition;

    if(send_notif){
    for(var bag in lootbags){
    if(lootbaglocs[bag].distanceSquaredTo(playerLocation) <= 200){
    var params = {}
    toNotif = "";

    for(var idx in lootbags[bag]){
    if(lootbags[bag][idx] != -1){
    var item = $.findItem(lootbags[bag][idx]);
    toNotif += "\\n" + item.id
    }
    }
    if(toNotif == ""){
    continue;
    }
    this.displayNotification(event,bag,0x00ffff,toNoti f);
    }
    }
    send_notif = false;
    $.scheduleEvent(2, "refresh_notif");
    }

    break;
    }
    }
    }

    function onServerPacket(event) {
    var packet = event.getPacket();
    switch (packet.id()) {
    case ID_CREATE_SUCCESS: {
    player_id = packet.objectId;
    break;
    }
    case ID_UPDATE: {
    // New objects
    for (var i = 0; i < packet.newObjs.length; i++) {
    var objectData = packet.newObjs[i];
    if(objectData == null)
    break;

    var type = objectData.objectType;

    if(type == 1280 || type == 1283 || (type >= 1286 && type <= 1296)){
    // new loot bag
    var bagId = objectData.status.objectId;
    lootbags[bagId] = [-1,-1,-1,-1,-1,-1,-1,-1];
    lootbaglocs[bagId] = objectData.status.pos;

    for (var j = 0; j < objectData.status.data.length; j++){
    var statData = objectData.status.data[j];
    if(statData.obf0 >= 8 && statData.obf0 <= 15){
    if(statData.obf1 != -1){
    var item = $.findItem(statData.obf1);

    if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
    lootbags[bagId][statData.obf0 - 8] = statData.obf1;
    }
    }

    }
    }

    }
    }

    // Removed objects
    for (var i = 0; i < packet.drops.length; i++) {
    var droppedObjectId = packet.drops[i];

    if(lootbags[droppedObjectId] != null){
    delete lootbags[droppedObjectId];
    delete lootbaglocs[droppedObjectId];
    }
    }

    break;
    }
    case ID_NEW_TICK: {
    for (var i = 0; i < packet.statuses.length; i++) {
    var status = packet.statuses[i];

    if(lootbags[status.objectId] != null){
    for (var j = 0; j < status.data.length; j++){
    var statData = status.data[j];
    if(statData.obf0 >= 8 && statData.obf0 <= 15){
    if(statData.obf1 == -1){
    lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
    }else{
    var item = $.findItem(statData.obf1);

    if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
    lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
    }
    }

    }
    }
    }
    }
    break;
    }
    }
    }

    function displayNotification(event, playerObjectId, color, text) {
    var notificationPacket = event.createPacket(ID_NOTIFICATION);
    notificationPacket.objectId = playerObjectId;
    notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"" + text + "\"}}";
    notificationPacke*****lor = color;
    event.sendToClient(notificationPacket);
    }

    function refresh_notif(event) {
    send_notif = true;
    }


    Credit goes to Nisuxen for making original file.

  2. #2
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    Yay! A new scripter!

    Edit :

    Code:
    }
    }
    
    }
    }
    }
    }
    break;
    }
    }
    }
    Is this a joke? XD
    Last edited by Alde.; 12-26-2013 at 03:45 AM.
    Alde is Alde is

  3. #3
    mezamog's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    AMURICA
    Posts
    133
    Reputation
    10
    Thanks
    48
    My Mood
    Amazed
    Quote Originally Posted by ZBORNOX View Post
    Yay! A new scripter!

    Edit :

    Code:
    }
    }
    
    }
    }
    }
    }
    break;
    }
    }
    }
    Is this a joke? XD
    As I said I didn't write the original so any flaws in coding not having to do with the item codes aren't mine. If I can do something different please tell me!

  4. #4
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95
    My script already displays UTs. That's what item.bagType == 4 means.

    edit: Well that actually means it displays white bag items. Non white bag UTs are kinda worthless to me.
    Last edited by Nisuxen; 12-26-2013 at 11:55 AM.

  5. #5
    mezamog's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    AMURICA
    Posts
    133
    Reputation
    10
    Thanks
    48
    My Mood
    Amazed
    Quote Originally Posted by Nisuxen View Post
    My script already displays UTs. That's what item.bagType == 4 means.
    Except that made it so only UTs in whitebags show up, I made it so all UTs like snake skin armor and crystal skull show up.

  6. #6
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    Quote Originally Posted by ZBORNOX View Post
    Yay! A new scripter!

    Edit :

    Code:
    }
    }
    
    }
    }
    }
    }
    break;
    }
    }
    }
    Is this a joke? XD
    jsbeautifier.org

    Code:
    // utnotif.js
    var ID_MOVE = $.findPacketId("MOVE");
    var ID_UPDATE = $.findPacketId("UPDATE");
    var ID_NEW_TICK = $.findPacketId("NEW_TICK");
    var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
    var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");
    
    var player_id = -1;
    var playerLocation = null;
    var lootbags = {};
    var lootbaglocs = {};
    var send_notif = true;
    
    var tier = 11; // Minimum tier of items to be notifi'ied
    
    var desirables = [
        0xc01, // Demon Blade
        0xa03, // Crystal Sword
        0xc05, // Ancient Stone Sword
        0xcdb, // Pirate King's Cutlass
        0xcdf, // Doctor Swordsworth
        0xc70, // Golden Ankh
        0xc71, // Eye of Osiris
        0xc72, // Pharaoh's Mask
        0xc73, // Golden Cockle
        0xc74, // Golden Conch
        0xc75, // Golden Horn Conch
        0xc78, // Golden Femur
        0xc79, // Golden Ribcage
        0xc7a, // Golden Skull
        0xc7e, // Golden Chalice
        0xc7d, // Pearl Necklace
        0xc7f, // Ruby Gemstone
        0xc7b, // Golden Candelabra
        0xc7c, // Holy Cross
        0xc77, // Golden Bolt
        0xc76, // Golden Nut
        0x722, // Wine Cellar Incantation
        0xc0a, // Dirk of Cronus
        0xc29, // Spirit Dagger
        0xced, // Sunshine Shiv
        0xc02, // Doom Bow
        0xc10, // Coral Bow
        0xcde, // Leaf Bow
        0xcec, // Robobow
        0xc03, // Staff of Extreme Prejudice
        0xcea, // KoalaPOW
        0xc04, // Wand of the Bulwark
        0xb3f, // Crystal Wand
        0xceb, // Spicy Wand of Spice
        0xcdc, // Doku No Ken
        0xcee, // Arbiters Wrath
        0xa5a, // Cloak of the Planewalker
        0xc07, // Quiver of Thunder
        0xc09, // Tome of Purification
        0xc1e, // Tome of Holy Protection
        0xc08, // Helm of the Juggernaut
        0xc0f, // Shield of Ogmur
        0xc06, // Seal of Blasphemous Prayer
        0xc0b, // Orb of Conflict
        0xc2a, // Ghostly Prism
        0xc61, // Candy-Coated Armor
        0xba2, // Ring of the Pyramid
        0xba0, // Ring of the Sphinx
        0xba1, // Ring of the Nile
        0xb3e, // Amulet of Resurrection
        0xbab, // The Forgotten Crown
        0xbad, // Bracer of the Guardian
        0xbac, // The Twilight Gemstone
        0xb41, // Tablet of the King's Avatar
        0xc22, // Bone Dagger
        0xc15, // Staff of the Crystal Serpent
        0xc1d, // St. Abraham's Wand
        0xc33, // Conducting Wand
        0x221c, // Skull-splitter Sword
        0xc18, // Coral Silk Armor
        0xc28, // Spectral Cloth Armor
        0xc1f, // Chasuble of Holy Light
        0xc14, // Robe of the Tlatoani
        0xc32, // Robe of the Mad Scientist
        0xc6e, // Resurrected Warrior's Armor
        0xc6d, // Plague Poison
        0xc16, // Cracked Crystal Skull
        0xc1c, // Coral Venom Trap
        0xc30, // Scepter of Fulmination
        0xc13, // Coral Ring
        0xc20, // Ring of Divine Faith
        0xc27, // Captain's Ring
        0xc31, // Experimental Ring
        0xc5f, // Candy Ring
        0x709, // Poison Fang Dagger
        0xa4b, // Sprite Wand
        0xa3e, // Snake Skin Armor
        0xa40, // Snake Skin Shield
        0x708, // Spider's Eye Ring
        0xa41, // Snake Eye Ring
        0xc17, // Crystal Bone Ring
    ];
    
    function onClientPacket(event) {
        var packet = event.getPacket();
        switch (packet.id()) {
        case ID_MOVE:
            {
                var time = packet.time;
                playerLocation = packet.newPosition;
    
                if (send_notif) {
                    for (var bag in lootbags) {
                        if (lootbaglocs[bag].distanceSquaredTo(playerLocation) <= 200) {
                            var params = {}
                            toNotif = "";
    
                            for (var idx in lootbags[bag]) {
                                if (lootbags[bag][idx] != -1) {
                                    var item = $.findItem(lootbags[bag][idx]);
                                    toNotif += "\\n" + item.id
                                }
                            }
                            if (toNotif == "") {
                                continue;
                            }
                            this.displayNotification(event, bag, 0x00ffff, toNoti f);
                        }
                    }
                    send_notif = false;
                    $.scheduleEvent(2, "refresh_notif");
                }
    
                break;
            }
        }
    }
    
    function onServerPacket(event) {
        var packet = event.getPacket();
        switch (packet.id()) {
        case ID_CREATE_SUCCESS:
            {
                player_id = packet.objectId;
                break;
            }
        case ID_UPDATE:
            {
                // New objects
                for (var i = 0; i < packet.newObjs.length; i++) {
                    var objectData = packet.newObjs[i];
                    if (objectData == null)
                        break;
    
                    var type = objectData.objectType;
    
                    if (type == 1280 || type == 1283 || (type >= 1286 && type <= 1296)) {
                        // new loot bag
                        var bagId = objectData.status.objectId;
                        lootbags[bagId] = [-1, -1, -1, -1, -1, -1, -1, -1];
                        lootbaglocs[bagId] = objectData.status.pos;
    
                        for (var j = 0; j < objectData.status.data.length; j++) {
                            var statData = objectData.status.data[j];
                            if (statData.obf0 >= 8 && statData.obf0 <= 15) {
                                if (statData.obf1 != -1) {
                                    var item = $.findItem(statData.obf1);
    
                                    if (item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1) {
                                        lootbags[bagId][statData.obf0 - 8] = statData.obf1;
                                    }
                                }
    
                            }
                        }
    
                    }
                }
    
                // Removed objects
                for (var i = 0; i < packet.drops.length; i++) {
                    var droppedObjectId = packet.drops[i];
    
                    if (lootbags[droppedObjectId] != null) {
                        delete lootbags[droppedObjectId];
                        delete lootbaglocs[droppedObjectId];
                    }
                }
    
                break;
            }
        case ID_NEW_TICK:
            {
                for (var i = 0; i < packet.statuses.length; i++) {
                    var status = packet.statuses[i];
    
                    if (lootbags[status.objectId] != null) {
                        for (var j = 0; j < status.data.length; j++) {
                            var statData = status.data[j];
                            if (statData.obf0 >= 8 && statData.obf0 <= 15) {
                                if (statData.obf1 == -1) {
                                    lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
                                } else {
                                    var item = $.findItem(statData.obf1);
    
                                    if (item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1) {
                                        lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
                                    }
                                }
    
                            }
                        }
                    }
                }
                break;
            }
        }
    }
    
    function displayNotification(event, playerObjectId, color, text) {
        var notificationPacket = event.createPacket(ID_NOTIFICATION);
        notificationPacket.objectId = playerObjectId;
        notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"" + text + "\"}}";
        notificationPacke*****lor = color;
        event.sendToClient(notificationPacket);
    }
    
    function refresh_notif(event) {
        send_notif = true;
    }
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  7. The Following 3 Users Say Thank You to 059 For This Useful Post:

    Alde. (12-26-2013),Atro (12-26-2013),mezamog (12-26-2013)

  8. #7
    mezamog's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    AMURICA
    Posts
    133
    Reputation
    10
    Thanks
    48
    My Mood
    Amazed
    Quote Originally Posted by 059 View Post
    jsbeautifier.org

    Code:
    // utnotif.js
    var ID_MOVE = $.findPacketId("MOVE");
    var ID_UPDATE = $.findPacketId("UPDATE");
    var ID_NEW_TICK = $.findPacketId("NEW_TICK");
    var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
    var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");
    
    var player_id = -1;
    var playerLocation = null;
    var lootbags = {};
    var lootbaglocs = {};
    var send_notif = true;
    
    var tier = 11; // Minimum tier of items to be notifi'ied
    
    var desirables = [
        0xc01, // Demon Blade
        0xa03, // Crystal Sword
        0xc05, // Ancient Stone Sword
        0xcdb, // Pirate King's Cutlass
        0xcdf, // Doctor Swordsworth
        0xc70, // Golden Ankh
        0xc71, // Eye of Osiris
        0xc72, // Pharaoh's Mask
        0xc73, // Golden Cockle
        0xc74, // Golden Conch
        0xc75, // Golden Horn Conch
        0xc78, // Golden Femur
        0xc79, // Golden Ribcage
        0xc7a, // Golden Skull
        0xc7e, // Golden Chalice
        0xc7d, // Pearl Necklace
        0xc7f, // Ruby Gemstone
        0xc7b, // Golden Candelabra
        0xc7c, // Holy Cross
        0xc77, // Golden Bolt
        0xc76, // Golden Nut
        0x722, // Wine Cellar Incantation
        0xc0a, // Dirk of Cronus
        0xc29, // Spirit Dagger
        0xced, // Sunshine Shiv
        0xc02, // Doom Bow
        0xc10, // Coral Bow
        0xcde, // Leaf Bow
        0xcec, // Robobow
        0xc03, // Staff of Extreme Prejudice
        0xcea, // KoalaPOW
        0xc04, // Wand of the Bulwark
        0xb3f, // Crystal Wand
        0xceb, // Spicy Wand of Spice
        0xcdc, // Doku No Ken
        0xcee, // Arbiters Wrath
        0xa5a, // Cloak of the Planewalker
        0xc07, // Quiver of Thunder
        0xc09, // Tome of Purification
        0xc1e, // Tome of Holy Protection
        0xc08, // Helm of the Juggernaut
        0xc0f, // Shield of Ogmur
        0xc06, // Seal of Blasphemous Prayer
        0xc0b, // Orb of Conflict
        0xc2a, // Ghostly Prism
        0xc61, // Candy-Coated Armor
        0xba2, // Ring of the Pyramid
        0xba0, // Ring of the Sphinx
        0xba1, // Ring of the Nile
        0xb3e, // Amulet of Resurrection
        0xbab, // The Forgotten Crown
        0xbad, // Bracer of the Guardian
        0xbac, // The Twilight Gemstone
        0xb41, // Tablet of the King's Avatar
        0xc22, // Bone Dagger
        0xc15, // Staff of the Crystal Serpent
        0xc1d, // St. Abraham's Wand
        0xc33, // Conducting Wand
        0x221c, // Skull-splitter Sword
        0xc18, // Coral Silk Armor
        0xc28, // Spectral Cloth Armor
        0xc1f, // Chasuble of Holy Light
        0xc14, // Robe of the Tlatoani
        0xc32, // Robe of the Mad Scientist
        0xc6e, // Resurrected Warrior's Armor
        0xc6d, // Plague Poison
        0xc16, // Cracked Crystal Skull
        0xc1c, // Coral Venom Trap
        0xc30, // Scepter of Fulmination
        0xc13, // Coral Ring
        0xc20, // Ring of Divine Faith
        0xc27, // Captain's Ring
        0xc31, // Experimental Ring
        0xc5f, // Candy Ring
        0x709, // Poison Fang Dagger
        0xa4b, // Sprite Wand
        0xa3e, // Snake Skin Armor
        0xa40, // Snake Skin Shield
        0x708, // Spider's Eye Ring
        0xa41, // Snake Eye Ring
        0xc17, // Crystal Bone Ring
    ];
    
    function onClientPacket(event) {
        var packet = event.getPacket();
        switch (packet.id()) {
        case ID_MOVE:
            {
                var time = packet.time;
                playerLocation = packet.newPosition;
    
                if (send_notif) {
                    for (var bag in lootbags) {
                        if (lootbaglocs[bag].distanceSquaredTo(playerLocation) <= 200) {
                            var params = {}
                            toNotif = "";
    
                            for (var idx in lootbags[bag]) {
                                if (lootbags[bag][idx] != -1) {
                                    var item = $.findItem(lootbags[bag][idx]);
                                    toNotif += "\\n" + item.id
                                }
                            }
                            if (toNotif == "") {
                                continue;
                            }
                            this.displayNotification(event, bag, 0x00ffff, toNoti f);
                        }
                    }
                    send_notif = false;
                    $.scheduleEvent(2, "refresh_notif");
                }
    
                break;
            }
        }
    }
    
    function onServerPacket(event) {
        var packet = event.getPacket();
        switch (packet.id()) {
        case ID_CREATE_SUCCESS:
            {
                player_id = packet.objectId;
                break;
            }
        case ID_UPDATE:
            {
                // New objects
                for (var i = 0; i < packet.newObjs.length; i++) {
                    var objectData = packet.newObjs[i];
                    if (objectData == null)
                        break;
    
                    var type = objectData.objectType;
    
                    if (type == 1280 || type == 1283 || (type >= 1286 && type <= 1296)) {
                        // new loot bag
                        var bagId = objectData.status.objectId;
                        lootbags[bagId] = [-1, -1, -1, -1, -1, -1, -1, -1];
                        lootbaglocs[bagId] = objectData.status.pos;
    
                        for (var j = 0; j < objectData.status.data.length; j++) {
                            var statData = objectData.status.data[j];
                            if (statData.obf0 >= 8 && statData.obf0 <= 15) {
                                if (statData.obf1 != -1) {
                                    var item = $.findItem(statData.obf1);
    
                                    if (item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1) {
                                        lootbags[bagId][statData.obf0 - 8] = statData.obf1;
                                    }
                                }
    
                            }
                        }
    
                    }
                }
    
                // Removed objects
                for (var i = 0; i < packet.drops.length; i++) {
                    var droppedObjectId = packet.drops[i];
    
                    if (lootbags[droppedObjectId] != null) {
                        delete lootbags[droppedObjectId];
                        delete lootbaglocs[droppedObjectId];
                    }
                }
    
                break;
            }
        case ID_NEW_TICK:
            {
                for (var i = 0; i < packet.statuses.length; i++) {
                    var status = packet.statuses[i];
    
                    if (lootbags[status.objectId] != null) {
                        for (var j = 0; j < status.data.length; j++) {
                            var statData = status.data[j];
                            if (statData.obf0 >= 8 && statData.obf0 <= 15) {
                                if (statData.obf1 == -1) {
                                    lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
                                } else {
                                    var item = $.findItem(statData.obf1);
    
                                    if (item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1) {
                                        lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
                                    }
                                }
    
                            }
                        }
                    }
                }
                break;
            }
        }
    }
    
    function displayNotification(event, playerObjectId, color, text) {
        var notificationPacket = event.createPacket(ID_NOTIFICATION);
        notificationPacket.objectId = playerObjectId;
        notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"" + text + "\"}}";
        notificationPacke*****lor = color;
        event.sendToClient(notificationPacket);
    }
    
    function refresh_notif(event) {
        send_notif = true;
    }
    Thanks this website is what i will use now.

  9. #8
    ZALONEANZA's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    55
    Reputation
    10
    Thanks
    3
    My Mood
    Chatty
    Thanks for this bro

Similar Threads

  1. Realm Relay Loot Notifs
    By Nisuxen in forum Realm of the Mad God Tutorials & Source Code
    Replies: 13
    Last Post: 02-01-2015, 04:25 AM
  2. [Help Request] loot notification
    By recloud in forum Realm of the Mad God Help & Requests
    Replies: 15
    Last Post: 08-29-2013, 08:31 PM
  3. [Help Request] Loot notifications?
    By Skatzi in forum Realm of the Mad God Help & Requests
    Replies: 6
    Last Post: 08-01-2013, 09:32 AM
  4. Public opinion poll soulbinding of Untiered Items
    By Botmaker in forum Realm of the Mad God Discussions
    Replies: 18
    Last Post: 06-18-2013, 03:29 PM
  5. Borderlands 2 Item Loot Editor
    By AlexHD in forum Borderlands 2 Hacks
    Replies: 20
    Last Post: 04-02-2013, 07:09 AM

Tags for this Thread