Results 1 to 11 of 11
  1. #1
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666

    [AVM2] How to add string and refer to it?

    For example:
    Code:
          callproperty        QName(Namespace("_var"), "_b6"), 1
          pushstring          "/credits/add?"
    callproperty refers to www,realmofthemadgod,com so the full url in this method is www,realmofthemadgod,com/credits/add?

    I need a string for custom url, but I have no idea how to add it also I don't know how to refer to it :P
    Maybe @nilly can help me?

  2. #2
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    Code:
    pop
    pushstring "customURL"
    Place following the callproperty instruction.
    Be careful, stray too far from the pack and you'll get lost.

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

    CrazyJani (08-17-2013)

  4. #3
    liaojh1998's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    The Mysterious Land of Magic
    Posts
    219
    Reputation
    10
    Thanks
    831
    My Mood
    Twisted
    Quote Originally Posted by nilly View Post
    Code:
    pop
    pushstring "customURL"
    Place following the callproperty instruction.
    Isn't that like creating a new customURL, not replacing
    I'm a total noob at games, don't mind me, I'M A NOOB .

    I just hack everything, but I suck at that too, I'M A NOOB .

    I play sports, I do work, I study, but I'M STILL A NOOB .

    What about you? YOU A NOOB TOO?

    Noobs... always gets the best things








  5. #4
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    Quote Originally Posted by liaojh1998 View Post
    Isn't that like creating a new customURL, not replacing
    It is creating a new one. Get rid of the old one, make and use new one, profit. Some people also view this as replacing.

    BTW I'm not sure if I understood the question correctly. If not, let me know.
    Be careful, stray too far from the pack and you'll get lost.

  6. #5
    liaojh1998's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    The Mysterious Land of Magic
    Posts
    219
    Reputation
    10
    Thanks
    831
    My Mood
    Twisted
    Quote Originally Posted by nilly View Post
    It is creating a new one. Get rid of the old one, make and use new one, profit. Some people also view this as replacing.

    BTW I'm not sure if I understood the question correctly. If not, let me know.
    It sometimes show up in the AS3 sorcerer saying some codes are not popped, I don't understand what that means, so I just added a pop in front of the pushstring and I thought it would be like create a new method or something.

    Sometimes like this

    pop
    pushstring "asdasdasdasd"
    setlocal 10

    changing max local to 11
    and it works, so I thought this would be like creating a new thing.

    I didn't know that by just doing customURL u can get a customURL method xD
    I'm a total noob at games, don't mind me, I'M A NOOB .

    I just hack everything, but I suck at that too, I'M A NOOB .

    I play sports, I do work, I study, but I'M STILL A NOOB .

    What about you? YOU A NOOB TOO?

    Noobs... always gets the best things








  7. #6
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    You are confusing terms around. All you are doing is playing with the stack. When avm2 calls a property and it has a returns a value, that value is pushed onto the stack. pop simply removes that value from the stack. When you pushstring, you are then pushing a string to the stack. Since I assume the callproperty returns a string object, pop'ing and replacing that object with another string is a way to circumvent the results of the callproperty instruction. As you see here, you aren't creating any new methods, just simply manipulating data.
    Be careful, stray too far from the pack and you'll get lost.

  8. #7
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666
    Thanks, @nilly, that worked, but another problem appeared:

    How do I refer to player being in specific map outside of player.class.asasm?
    Last edited by CrazyJani; 08-17-2013 at 09:32 AM.

  9. #8
    liaojh1998's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    The Mysterious Land of Magic
    Posts
    219
    Reputation
    10
    Thanks
    831
    My Mood
    Twisted
    Quote Originally Posted by nilly View Post
    You are confusing terms around. All you are doing is playing with the stack. When avm2 calls a property and it has a returns a value, that value is pushed onto the stack. pop simply removes that value from the stack. When you pushstring, you are then pushing a string to the stack. Since I assume the callproperty returns a string object, pop'ing and replacing that object with another string is a way to circumvent the results of the callproperty instruction. As you see here, you aren't creating any new methods, just simply manipulating data.
    Oh, so if I pushstring on a stack before, pop removes the string on that stack?
    and then I pushstring and it adds a new one, simply like replacing it?
    I'm a total noob at games, don't mind me, I'M A NOOB .

    I just hack everything, but I suck at that too, I'M A NOOB .

    I play sports, I do work, I study, but I'M STILL A NOOB .

    What about you? YOU A NOOB TOO?

    Noobs... always gets the best things








  10. #9
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    Quote Originally Posted by liaojh1998 View Post
    Oh, so if I pushstring on a stack before, pop removes the string on that stack?
    and then I pushstring and it adds a new one, simply like replacing it?
    Yes, you got it.

    ---------- Post added at 03:34 PM ---------- Previous post was at 03:33 PM ----------

    Quote Originally Posted by CrazyJani View Post
    Thanks, @nilly, that worked, but another problem appeared:

    How do I refer to player being in specific map outside of player.class.asasm?
    It depends on where you are at and what variables you have access to. What class you editing?
    Be careful, stray too far from the pack and you'll get lost.

  11. #10
    liaojh1998's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    The Mysterious Land of Magic
    Posts
    219
    Reputation
    10
    Thanks
    831
    My Mood
    Twisted
    Quote Originally Posted by nilly View Post
    Yes, you got it.

    ---------- Post added at 03:34 PM ---------- Previous post was at 03:33 PM ----------



    It depends on where you are at and what variables you have access to. What class you editing?
    nilly, if rabcdasm as AVM2 bytecode is one option to edit the swf, what's another option? C++?
    I want to know because I want to see if there is another way to edit swfs
    I'm a total noob at games, don't mind me, I'M A NOOB .

    I just hack everything, but I suck at that too, I'M A NOOB .

    I play sports, I do work, I study, but I'M STILL A NOOB .

    What about you? YOU A NOOB TOO?

    Noobs... always gets the best things








  12. #11
    nilly's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    2,652
    Reputation
    155
    Thanks
    13,983
    My Mood
    Angelic
    There are plenty of ways to edit the swf you just have to find them. Personally I rarely work with bytecode anymore. I'll do little things in it but for big stuff I edit the client in as3. Much easier. It's sort of a trade secret though. You'll have to stumble along and figure out how I do that yourself.
    Be careful, stray too far from the pack and you'll get lost.

Similar Threads

  1. how to add new classes and new projectiles for specific weapons?
    By atenzor in forum Realm of the Mad God Private Servers Help
    Replies: 4
    Last Post: 07-18-2013, 09:05 PM
  2. [Help Request] How to add memory hacks on DIP and Present base?
    By Major_Jake in forum Crossfire Coding Help & Discussion
    Replies: 2
    Last Post: 09-14-2012, 11:28 PM
  3. [Help] How to add addys and make it hex?
    By IamH4cker in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 15
    Last Post: 08-06-2012, 07:09 PM
  4. How do you add textures and sound to a cross mod?
    By Fantasi in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 11-24-2011, 04:05 AM
  5. How to add an attachment file and how to make CA hacks.
    By Klumzy in forum Programming Tutorial Requests
    Replies: 2
    Last Post: 07-15-2009, 12:52 PM