Results 1 to 7 of 7
  1. #1
    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

    Need Help with coding a RealmRelay Script!

    Hello there!

    I'd like to know how to make this function works :
    Code:
    function sound(soundeffect) {
    	var notificationPacket = $.createPacket(ID_PLAYSOUND);
    	notificationPacket.ownerId = playerObjectId;
    	notificationPacket.soundId = 19 //This is where I need help!
    	$.sendToClient(notificationPacket);
    }
    I need help with the "soundId" thing.
    Is there any list out here with the sound names and their IDs?

    THANKS A LOT! <3


    Also ; what is the lock-a-player function? I counldnt find it.. :/ Are they client sided stored?
    Last edited by Distraught; 12-13-2013 at 06:09 PM.
    Alde is Alde is

  2. #2
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95
    Locking players can't be client sided. But now that you mention it, I'm interested to see how they work as well... Something I'll look into if RR is updated. As for sound id's, I would recommend running around realms and printing out the contents of sound packets to see what soundIds you get. I don't imagine they are very complicated. Probably just 0 through N.

  3. The Following User Says Thank You to Nisuxen For This Useful Post:

    Alde. (12-15-2013)

  4. #3
    DeVoidCoder's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    702
    Quote Originally Posted by Nisuxen View Post
    Something I'll look into if RR is updated.
    The RR 17.3+ thread was closed for being outdated once again, but it still works with 18.0.

  5. The Following 4 Users Say Thank You to DeVoidCoder For This Useful Post:

    Alde. (12-15-2013),BinaryCoder (12-13-2013),Botmaker (12-13-2013),Nisuxen (12-13-2013)

  6. #4
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95
    Quote Originally Posted by DeVoidCoder View Post
    The RR 17.3+ thread was closed for being outdated once again, but it still works with 18.0.
    Ah I see. I only tried it on the rotmg website and it didn't work. Works fine with client. I'll know better next time.

  7. #5
    Distraught's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    California
    Posts
    1,897
    Reputation
    659
    Thanks
    1,355
    Quote Originally Posted by DeVoidCoder View Post
    The RR 17.3+ thread was closed for being outdated once again, but it still works with 18.0.
    Next time that happens. Just respond to the Close Thread message you got with proof that it still works. If you provide me a screenshot or the such. I can reopen it off mobile. Just can't check it atm.

  8. #6
    Threadstarter
    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
    Quote Originally Posted by Nisuxen View Post
    I would recommend running around realms and printing out the contents of sound packets to see what soundIds you get.
    Woah! That's a great idea!
    Gimme some time ill brb with the script <3


    Quote Originally Posted by Nisuxen View Post
    Locking players can't be client sided. But now that you mention it, I'm interested to see how they work as well...


    After some work, I found that the packet concerned is "EDITACCOUNTLIST".

    Here is the script I used ; (may be usefull for futur works)

     

    Code:
    //OnPacket.js
    
    
    $.echo("> OnPacket loaded.");
    
    
    var ID_ACCEPTTRADE = $.findPacketId("ACCEPTTRADE");
    var ID_AOEACK = $.findPacketId("AOEACK");
    var ID_BUY = $.findPacketId("BUY");
    var ID_CANCELTRADE = $.findPacketId("CANCELTRADE");
    var ID_CHANGEGUILDRANK = $.findPacketId("CHANGEGUILDRANK");
    var ID_CHANGETRADE = $.findPacketId("CHANGETRADE");
    var ID_CHECKCREDITS = $.findPacketId("CHECKCREDITS");
    var ID_CHOOSENAME = $.findPacketId("CHOOSENAME");
    var ID_CREATEGUILD = $.findPacketId("CREATEGUILD");
    var ID_CREATE = $.findPacketId("CREATE");
    var ID_EDITACCOUNTLIST = $.findPacketId("EDITACCOUNTLIST");
    var ID_ENEMYHIT = $.findPacketId("ENEMYHIT");
    var ID_ESCAPE = $.findPacketId("ESCAPE");
    var ID_GOTOACK = $.findPacketId("GOTOACK");
    var ID_GROUNDDAMAGE = $.findPacketId("GROUNDDAMAGE");
    var ID_GUILDINVITE = $.findPacketId("GUILDINVITE");
    var ID_GUILDREMOVE = $.findPacketId("GUILDREMOVE");
    var ID_HELLO = $.findPacketId("HELLO");
    var ID_INVDROP = $.findPacketId("INVDROP");
    var ID_INVSWAP = $.findPacketId("INVSWAP");
    var ID_JOINGUILD = $.findPacketId("JOINGUILD");
    var ID_LOAD = $.findPacketId("LOAD");
    var ID_MOVE = $.findPacketId("MOVE");
    var ID_OTHERHIT = $.findPacketId("OTHERHIT");
    var ID_PLAYERHIT = $.findPacketId("PLAYERHIT");
    var ID_PLAYERSHOOT = $.findPacketId("PLAYERSHOOT");
    var ID_PLAYERTEXT = $.findPacketId("PLAYERTEXT");
    var ID_PONG = $.findPacketId("PONG");
    var ID_REQUESTTRADE = $.findPacketId("REQUESTTRADE");
    var ID_RESKIN = $.findPacketId("RESKIN");
    var ID_SETCONDITION = $.findPacketId("SETCONDITION");
    var ID_SHOOTACK = $.findPacketId("SHOOTACK");
    var ID_SQUAREHIT = $.findPacketId("SQUAREHIT");
    var ID_TELEPORT = $.findPacketId("TELEPORT");
    var ID_UPDATEACK = $.findPacketId("UPDATEACK");
    var ID_USEITEM = $.findPacketId("USEITEM");
    var ID_USEPORTAL = $.findPacketId("USEPORTAL");
    
    
    
    
    
    function onClientPacket(event) {
            // get the packet involved in this event
            var packet = event.getPacket();
    		
    		
    		
            // if this event's packet is a TEXT packet...
    		
    		if (packet.id() == ID_ACCEPTTRADE) {$.echo("> Sent a accepttrade packet.");}
    		if (packet.id() == ID_AOEACK) {$.echo("> Sent a aeoak packet.");}
    		if (packet.id() == ID_BUY) {$.echo("> Sent a buy packet.");}
    		if (packet.id() == ID_CANCELTRADE) {$.echo("> Sent a canceltrade packet.");}
    		if (packet.id() == ID_CHANGEGUILDRANK) {$.echo("> Sent a changeguildrank packet.");}
    		if (packet.id() == ID_CHANGETRADE) {$.echo("> Sent a changetrade packet.");}
    		if (packet.id() == ID_CHECKCREDITS) {$.echo("> Sent a checkcredits packet.");}
    		if (packet.id() == ID_CHOOSENAME) {$.echo("> Sent a choosename packet.");}
    		if (packet.id() == ID_CREATEGUILD) {$.echo("> Sent a createguild packet.");}
    		if (packet.id() == ID_CREATE) {$.echo("> Sent a create packet.");}
    		if (packet.id() == ID_EDITACCOUNTLIST) {$.echo("> Sent an editaccountlist packet.");}
    		if (packet.id() == ID_ENEMYHIT) {$.echo("> Sent an enemyhit packet.");}
    		if (packet.id() == ID_ESCAPE) {$.echo("> Sent an escape packet.");}
    		if (packet.id() == ID_GOTOACK) {$.echo("> Sent a gotoack packet.");}
    		if (packet.id() == ID_GROUNDDAMAGE) {$.echo("> Sent a grounddamage packet.");}
    		if (packet.id() == ID_GUILDINVITE) {$.echo("> Sent a guildinvite packet.");}
    		if (packet.id() == ID_GUILDREMOVE) {$.echo("> Sent a guildremove packet.");}
    		if (packet.id() == ID_HELLO) {$.echo("> Sent a hello packet.");}
    		if (packet.id() == ID_INVDROP) {$.echo("> Sent a invdrop packet.");}
    		if (packet.id() == ID_INVSWAP) {$.echo("> Sent a invswap packet.");}
    		if (packet.id() == ID_JOINGUILD) {$.echo("> Sent a joinguild packet.");}
    		if (packet.id() == ID_LOAD) {$.echo("> Sent a load packet.");}
    		if (packet.id() == ID_MOVE) {$.echo("> Sent a move packet.");}//Update the pos
    		if (packet.id() == ID_OTHERHIT) {$.echo("> Sent a otherhit packet.");}
    		if (packet.id() == ID_PLAYERHIT) {$.echo("> Sent a playerhit packet.");}
    		if (packet.id() == ID_PLAYERSHOOT) {$.echo("> Sent a playershoot packet.");}
    		if (packet.id() == ID_PLAYERTEXT) {$.echo("> Sent a playertext packet.");}
    		if (packet.id() == ID_PONG) {$.echo("> Sent a pong packet.");}//IDK?
    		if (packet.id() == ID_REQUESTTRADE) {$.echo("> Sent a requesttrade packet.");}
    		if (packet.id() == ID_RESKIN) {$.echo("> Sent a reskin packet.");}
    		if (packet.id() == ID_SETCONDITION) {$.echo("> Sent a setcondition packet.");}
    		if (packet.id() == ID_SHOOTACK) {$.echo("> Sent a shootack packet.");}
    		if (packet.id() == ID_SQUAREHIT) {$.echo("> Sent a squarehit packet.");}
    		if (packet.id() == ID_TELEPORT) {$.echo("> Sent a teleport packet.");}
    		if (packet.id() == ID_UPDATEACK) {$.echo("> Sent a updateack packet.");}//Update the tiles and ojects
    		if (packet.id() == ID_USEITEM) {$.echo("> Sent a useitem packet.");}
    		if (packet.id() == ID_USEPORTAL) {$.echo("> Sent a useportal packet.");}
    		
    		
    		
    		
    		
    		
    		
    		
    		
    		
    }


    Todo :

    Find a way to convert a players name into objectId...
    Last edited by Lovroman; 03-29-2014 at 11:38 AM.
    Alde is Alde is

  9. #7
    Nisuxen's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    164
    Reputation
    10
    Thanks
    95
    Ah that's what that packet is for.
    Quote Originally Posted by ZBORNOX View Post
    Find a way to convert a players name into objectId...
    I can help you out there. Whenever you get an update function with a bunch of Entities each containing a Satus with an array of StatDatas. Whichever StatData has an obf0 of 31 also has an obf2 containing the player's name. Couple of my scripts keep up with player names based on objectIds.

Similar Threads

  1. [Help Request] Need help with Coding.
    By Squeeze in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 10-09-2012, 09:32 PM
  2. need help with code
    By rangg in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 8
    Last Post: 10-24-2010, 02:24 PM
  3. need help with coding vip console
    By GER-Domi. in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 13
    Last Post: 09-10-2010, 03:28 AM
  4. [HELP] Need help with code. REWARD
    By deadskulz in forum Visual Basic Programming
    Replies: 14
    Last Post: 05-24-2010, 05:35 AM
  5. I need help with codes
    By MATTHEW4422 in forum Combat Arms Help
    Replies: 0
    Last Post: 10-31-2009, 04:41 PM