Jump to content

exec

Administrators
  • Posts

    1176
  • Joined

  • Last visited

  • Days Won

    335

Posts posted by exec

  1. 56 minutes ago, Cryptic said:

    Scripts are in Lua? gasp!

    Yaha! I finally got to use Lua, since there was nobody advocating for C#! xD I wanted to use Lua for ages. Sneak peek? :)

    Spoiler
    
    ----- Melia Script ----------------------------------------------------------
    -- Stylist
    ----- Description -----------------------------------------------------------
    -- Allows changing the player's hair style.
    ----- Notes -----------------------------------------------------------------
    -- There are no separate style and color settings, every hair style exists
    -- X times, with different colors. While the NPC could split them, it would
    -- only work while the client sticks to a strict "X styles Y colors" system.
    -----------------------------------------------------------------------------
    
    addnpc(57223, "Stylist", "c_Klaipe", -66, 79, -547, 135, "stylist")
    
    function stylist()
    	local pc = getpc()
    	local min, max = 1, 50
    	local style = pc.hair
    
    	function setStyle(val)
    		style = val
    		loopStyle()
    	end
    
    	function modStyle(mod)
    		style = style + mod
    		loopStyle()
    	end
    
    	function loopStyle()
    		if style > max then
    			style = min
    		elseif style < min then
    			style = max
    		end
    	end
    
    	local selection = select("What can I do for you today?", "Change Hair", "Nothing")
    	if selection == 2 then
    		msg("Please come back any time.")
    		return
    	end
    
    	msg("Good decision, one should treat himself once in a while.")
    
    	while true do
    		changehair(style)
    		selection = select("This is style " .. style .. ", what do you think?", "Next", "Prev", "Jump", "I like it")
    
    		if selection == 1 then
    			modStyle(1)
    		elseif selection == 2 then
    			modStyle(-1)
    		elseif selection == 3 then
    			setStyle(numinput("Which style would you like to see?", min, max))
    		elseif selection == 4 then
    			msg("Yes, this style does suit you well. Please come back any time.")
    			return
    		end
    	end
    end
    

     

     

    • Like 1
  2. Melia is a server emulator for the MMORPG Tree of Savior (commonly referred to as the spiritual successor to Ragnarok Online).

    Development began in August 2015 as a side-project, and while we have made some decent progress, the emulator is still very young. Some of the basic features currently working are: Character creation, moving and warping, inventory and equipment, and NPCs. We also have working test code for basic combat.

    Melia uses C# for its core, MySQL for the database, and Lua for its scripts.

    Our current plan is to not release Melia before the actual game is available to the general public (this means international release, or at least open beta). While this plan might change in the future, it probably won't, as it wouldn't feel right to us, to release an emulator before the game. Afterwards it will be available as open-source, just like our Mabinogi server emulator, Aura.

    For the time being, you may subscribe to me on YouTube, where I upload videos about new features that get implemented from time to time. Should you have questions about the future of Melia, feel free to ask them in this sub-forum.

    FAQ

    Where can I download the client?

    For legal reasons we're unable to share the client here. If you weren't in the international closed beta, I'm afraid you will have to wait until the game is released, or find a different source.

    Preview

     

  3. PaleTree is a packet logger that utilizes data coming from packet providers, like Zemyna.

    ss+(2015-12-01+at+07.46.47).png

    Just like its cousin MabiPale, PaleTree allows you to log packets, and save, load, and modify the logs. However, unlike MabiPale, you won't see clear, separated variables here, as ToS's protocol doesn't communicate this information. Instead, PaleTree features a hex editor on the right side, and it has a plugin to show which values might hide behind a bunch of random bytes, starting at the selected index. For deeper analysis, a tool like 010 Binary Editor is recommended.

    Another difference to MabiPale, is that due to the availability of op codes, there are no unknown ops, and in case of changes, the ops are saved inside the logs, so you never have to worry about incorrect op names. But you should update PaleTree regularly, since any change in an op could result in confusing data.

    Download

    Remember to regularly update PaleTree and Zemyna whenever one is available, as they need to be up-to-date to work with the latest client.

    Features

    • Logging packets
    • Saving logs
    • Log management (deleting, filtering)
    • Plugin system
    • Official plugins:
      • Variable Preview: Displays what values could be read from a packet, starting at the selected byte.

    How to use

    • Put Zemyna.exe into your ToS folder
    • Create a link to Zemyna.exe, using parameters for the appropriate server. For example to connect to the international server Laima, you would use Laima's login server IP and port:
      Zemyna.exe host:54.88.25.242 port:2000

      And to connect to a local server, without Steam auto-login, but with a login form, you would use this:

      Zemyna.exe host:127.0.0.1 port:2000 nosteam
    • Start the client with that link whenever you want to log packets.
    • Click connect in Pale to subscribe to Zemyna's packet broadcast and to start logging packets.

    Packet data

    The packet data in the hex editor is always the raw data received/sent by the client, incl. packet header. This means the actual values don't start at the first byte.

    Packets from the client to the server have a 10 byte header:

    short op;
    int sequence;
    int checksum;

    Packets from the server to the client are the same, just without the checksum, so it's 6 bytes in total. Additionally, packets that don't have a fixed size have another short (2 byte) before the actual data, the length of the entire packet. Packets that have a fixed length will say something like "Size: 50 (Table: 50, Garbage: 0)" in the packet information on the right side, after the op, while dynamic packets don't say this (dynamic packets are ones that include lists or variable sized strings, where you can't define a fixed size).

    The last thing of note is the potential "garbage" at the end of packets from the client to the server. Because of how the packet encryption works, the length of packets from the client to the server is always a multiple of 8. Packets that have a fixed size will be able to determine that X byte are "garbage", because they don't belong to the actual data, but are a left-overs from the encryption process.

    The garbage bytes can generally be ignored, the only reason we don't truncate them is that we could potentially lose data if the ops are outdated.

    • Like 2
  4. Zemyna acts as a kind of proxy, it makes the client connect to a special local server that forwards all packets from the client to the actual server. This way it's able to read every single packet that gets sent or received. These packets can then be passed to other applications, so they can work with them, e.g. loggers like PaleTree.

    If you're familiar with Morrighan, you will feel right at home here.

    Download

    Remember to regularly update PaleTree and Zemyna whenever one is available, as they need to be up-to-date to work with the latest client.

    How to use

    For Zemyna to be able to read packets, it needs control over the starting process, as it temporarily adjusts your client, to tunnel its connection. It does so by making a backup of your client.xml, that contains information about where to connect to, and creates a new one. This change is reverted once Zemyna closes, this way you don't have to fiddle with any files yourself.

    To tell Zemyna where to connect the client to, you use command line parameters. For example, let's say you wanted to log packets on the international server Laima, you would simply start it like this from the command line, after moving Zemyna to your game folder:

    Zemyna.exe host:54.88.25.242 port:2000

    The IP and port are of the login server for Laima. For easier reusability, you should create a link or bat file. Zemyna will then take the necessary steps to be able to read packets from the network, and start the client. A small window in the upper left corner will show you that Zemyna is running, it closes automatically when the client gets closed. You can also double click it to quickly close Zemyna and the client.

    Since you can only have one server in the server list this way, the one you specify in the parameters, you could create multiple links/bats, one for each server.

    If you want to use Zemyna on a server that doesn't use the Steam auto-login, but a login interface, you have to tell it, with another parameter. For example, connecting to a local server:

    Zemyna.exe host:127.0.0.1 port:2000 nosteam

    How to connect to Zemyna

    Zemyna uses the same API as the tool it was inspired by, "Alissa". It uses WM_COPY messages to communicate between Zemyna's and the subscriber's window. To subscribe to Zemyna, to receive packets, you send the "op" (dwData) 100 to Zemyna's window (window name: "mod_Tossa"), to unsubscribe, you send 101. While you're subscribed, you receive all incoming (op 0x10101012) and outgoing (op 0x10101011) packets via the same method.

    For an actual example on how this works, I suggest looking at the corresponding functions in Pale. Alternatively you can also create a plug-in for Pale, which will be easier.

    Restrictions

    • Zemyna currently only supports the Login and Channel servers.
    • Due to ToS's protocol, Zemyna needs to be updated regularly, or there's a high chance for it not to function correctly. Check for updates after each game patch and report potential issues.

    Korean TOS

    If you click on Download, you will find multiple versions, one of them being for kTOS (notice the "k" prefix). Choose that one if you want to log packets on the Korean server.

    Due to kTOS using a web login, we had to do things a little differently for the Korean version of Zemyna. You need an additional argument, "kr", which activates certain KR only options. Example:

    Zemyna.exe host:54.88.25.242 port:2000 kr

    After you started Zemyna like that, the client won't start automatically, but it will still modify the client files, so when you finally start the client via the web login, the connection will still go through Zemyna, allowing you to log packets using PaleTree.

    • Like 1
  5. Enchants are apparently saved as structs inside the item data, similar to ItemInfo and ItemOptionInfo, and by the looks of it, every enchant effect might actually be its own struct.

    565d8999b52aa_ss(2015-12-01at12.50.39).p

    mabinogi_2015_12_01_001.jpg.15f4c79f0ae2

    You can clearly see the values as a short, at the end of the first line, and the short before that is probably the stat. I wondered where the increased repair fee is for a moment, but then I remembered that the fee is based on the item's price, so the enchant most likely simply increased the price.

    Reforges seem to work the same way, with one struct inside this list for every effect. From what I can tell they start with 07, instead of 01, so the first int (?) is probably the type.

    Unfortunately I don't have a clue what the other values mean, which is why we need more data. Much more. We need logs of many different enchants, with different stats, different values, and different effects. For example, I have no clue where it would store the "Level >= X" checks.

    If you want to help out, get your enchanted items, drop one, pick it back up, log the packet with the op ItemNew, and post it here, or send it to me via PM, with a note, of which enchants the item has, so I can compare the information. Posting here would be better though. Don't worry about the data, if you exclude or mask the packet id and the first long in ItemNew, there shouldn't be anything that could lead back to you.

    • Like 1
  6. The attached file contains all field spawns up to G3, as ready to use function calls. They are based on the group data from the region/area files. However, last time someone worked on these, we discovered that some area definitions don't seem to be 100% correct, and that some spawns shouldn't exist (anymore?). I don't know if there are missing ones as well, but this file should still help whoever decides to add those spawners. Every spawn has to be checked though.

    If someone decides to tackle this to make a pull request, please put the spawners in appropriate region scripts, and comment them, so you can see where they are. Just take the existing ones as an example. Like in regions/tir.cs:

    // Graveyard
    CreateSpawner(race: 30014, amount: 22, region: 1, coordinates: A(18595,40025, 15904,44605, 21371,47817, 24062,43237)); // White Spider
    CreateSpawner(race: 30003, amount: 1, region: 1, coordinates: A(18595,40025, 15904,44605, 21371,47817, 24062,43237)); // Red Spider
    

    We should probably also use a dummy AI for the monsters added in this way, if they don't have one already. (You can find the available AIs in scripts/ai/.) Otherwise they'd just be standing around. The "wander" AI for example would at least make them walk around.

    spawns.txt

    • Like 1
  7. Huh... maybe what's being changed isn't sent to yourself =/ Guess we need a log of someone else using a sticker, and possibly a login packet.

    Update: I found the place where the sticker values are set in the login packet you sent me, @Cryptic, thanks. Unfortunately you only see them on others on Aura for some reason, but not on yourself... I don't know why yet.

  8. I don't know if anybody cares, but today I thought about something that happened to me a few years ago and I kinda felt like posting it. It's also a kind of interesting insight on how Nexon operates, and how translations are handled.

    Back when Mabi EU was still online and active, I was approached by a moderator of the official Mabinogi EU forum. Apparently Nexon was looking for people to translate an upcoming patch for MapleStory, who could translate it from English to their native language. This was one week before the patch was to be released, but they didn't seem to be in any hurry. My first question was about the payment and after the moderator consulted with the EU version of Sabina, I was told some numbers. The translation of the whole patch into one language would've been worth about 700€ ($975), I agreed, having nothing better to do that week.

    It took two more days for them to find more people, and eventually me and a hand full of others received huge Excel tables to translate, with a note that they were to be sent back 3 days later. The first problem: no information whatsoever. Nobody on the "team" (I was only in direct contact with one other translator, who I knew coincidentally) was playing MapleStory, and even if we were, this was a whole new quest line with new items, locations, NPCs, etc.

    We had no idea how to translate certain words and we had problems actually understanding certain dialogues without knowing the story, we had no way to discuss how to translate things so they'd be consistent throughout the whole patch, which resulted in certain things being called X in one quest and Y in the next one, because multiple people were working on one language, there wasn't even an explanation on how the markup worked, you know like when an item is displayed in a dialog, or when the text is colored, there are codes for this, inside the text that we were to translate. The only reason me and the other translator knew what we were doing in this regard was that I knew all the codes because I had worked on MapleStory pservers before! And it was the weekend, so we couldn't ask "EU Sabina" for anything. Our only contact was the Mabinogi forum moderator, who didn't have any information or contact to the other translators that he didn't recruit.

    At the end of the weekend I had translated about 120€ worth of lines, a little more than I had to, the other translator about 60€. Each of us had specific ranges that we were to translate (like row 1000~2000), but we were told we didn't have to get it done and we could also do more if we wanted. (For consistency? I don't know.) Monday came and they wanted the translations, to proof read and fix them up before the patch on Wednesday, and I suppose they also had to fill holes if somebody didn't translate their whole section. (However that worked.)

    Tuesday I received a checked version of my Excel file, with notes about a few mistakes. I wasn't supposed to fix them, I guess they just wanted to show me what I did wrong. A few spelling mistakes, but nothing serious. Then it was Wednesday... excited I downloaded the patch from the FTP, turned on my unpacker that I still had lying around, and looked at the translations. (MapleStory stores a lot on the client side, including NPC information and (quest) dialogues.) I found the things I had translated, surprisingly including all of my mistakes. Why they had somebody proof read and correct everything when they didn't plan to use that improved version is beyond me. But it was done, happily I closed everything and waited for the promised contact about the payment, laughing about the other translator who actually went and played the game for the first time, to see his translations =P

    One week later I hadn't heard anything yet. Neither did the other translator, nor the moderator. Slowly we started to ask when we would finally get paid, "EU Sabina" only responding "be patient", inquires via eMail being ignored completely (well, they ignore support requests, why would they answer when you want money?), and calling wouldn't get you anywhere either, because nobody felt responsible for you.

    We didn't have any contract or anything, mistake on our part, so we couldn't really do anything but wait and hope. About a year I wrote them every other day, "EU Sabina" stopped responding to the questions, the other translator had long given up. I didn't expect anything anymore at this point either, but I still continued, just for the heck of it. 14 months after we had finished the translation I received an answer to one of my inquires.

    Nexon: "Translation? What? Huh? Uhu... okay, I guess we can pay you some NX."
    Me: "NX... I'm only playing Mabinogi, which is going offline very soon, I don't have any use for NX, we were promised something else..."
    Nexon: "Sorry about that, blah blah blah, the only thing I can offer you is that money in NX, but if you don't want that..." ("that money" being the sum I had given them for one year in every mail, didn't sound like they actually had data on who translated what.)
    Me: "Okay then, give it to me. Not like I have a choice..."

    And together with the compensation for all the money I spent on Mabi EU, that we got when it went down, minus some NX that I spent on Vindictus over the years when I was really bored, a large part of that "money" is still there to this day.

    b26810461a.png

  9. What is "No Code No Life"?

    No Code No Life was originally a community built around the development of a certain server emulator, under the name "Aura Project." We're now aiming to provide a general environment for developers to learn more about MMORPGs, discuss their inner workings, and release tools to research and modify them. We welcome newbies and experienced developers alike, as well as other users who're just here to grab the latest release of a tool that might help them in some way.

    While furthering our knowledge and research might entail developing server emulators, we aren't interested in actually operating servers, and solely do it for the purpose of learning about programming, MMORPGs, maintaining huge projects, working with other people, improving knowledge, exploring games we like in a new way, and experimenting with what could be. We're not operating any private servers and don't encourage our users to do so either.

    • Like 2
  10. 2 hours ago, Sairii said:

    30201 Chaincasting skill id (in this case firebolt)

    Ah... good catch, hadn't noticed that yet. Hm, maybe it's not really a long, maybe they added that value for the first upgrade of this kind, Chain Casting, they just put the skill id and the level in there, as one string to save bandwidth or something. Afterwards they kept adding to it. Would make sense to a certain degree, even if it's still stupid ~_~

  11. WU:s:00000003000000;
    WU:s:00000000000c10;
    WU:s:30201400000015;

    When will I ever learn not to think "I've seen everything now" when it comes to devCAT? Putting 4+ values into a long and saving it as a hex string... who comes up with stuff like that??

  12. No idea, the names are based on the names used in the client =| Let's see... the upgrades that have that modification are these:

    ident: "knight_lance_lance_taunes_remodeling", name: "Taunes's Bone-Breaker Upgrade"
    ident: "lord_demonic_lance", name: "Break Oculus Lance Seal"
    ident: "dragon_bow_seal_break", name: "Unseal Bhafel Hunter"
    ident: "dragon_slayer_seal_break", name: "Unseal Bhafel Slayer"
    ident: "Leanghirith_Bonebreaker_taunes_remodeling", name: "Taunes's Bone-Breaker Upgrade"
    ident: "disciple_sword_extra", name: "Fanatic Greatsword Unique Upgrade"
    ident: "disciple_bow_extra", name: "Salvation Bow Unique Upgrade"
    ident: "celtic_crossbow_piercing", name: "Keen Finish"

    Looking at the Wiki, I guess it is called "Piercing". Maybe they called it lance_piercing because lances were the first weapons to have it, before the combat updates happened.

  13. While many types of item upgrades are supported already, we're still missing some, that I didn't have any data on.

    // TODO:
    // - CollectionSpeed
    // - CollectionBonus
    // - SplashRadius
    // - ManaUse
    // - ManaBurn
    // - MagicDamage
    // - CastingSpeed
    // - LancePiercing
    // - MusicBuffBonus
    // - MusicBuffDuration
    // - MaxBullets
    // - Artisan
    // - ChainCast

    If you have items with these types of upgrades, try to get the item data with Pale, for example, by dropping the item and picking it back up, and post it here. What I need are the two strings after the bins, the meta data.

    6e112640c6.PNG

    It might look something like this:

    MTWR:1:1;
    MTWR:1:1;EHLV:4:2;OWNER:s:Name;
    QUAL:4:61;MTWR:1:1;

     

  14. Just a few I found on one of my chars. Feel free to post your own, so we get a list of potential meta data and corresponding items. You can also post what the data does if you find out, if they aren't obvious already.

    To find them you can simply look through your 5209, the two strings after the second bin are meta data 1 and 2. Though you have to convert the item id yourself (second int in the first bin).

    MetaData1
    =============================================================================
    
    63009 - Red Wing
    TARGET:s:portal@Alby_Dungeon;
    TARGET:s:portal@Barri_Dungeon;
    TARGET:s:portal@Math_Dungeon;
    TARGET:s:portal@Rabbie_Dungeon;
    TARGET:s:portal@Ciar_Dungeon;
    
    81202 - Return Coupon
    TARGET:s:pos@31,12545,12551;EVALUE:4:35020;PFARM:b:true;
    
    * - Upgraded weapons
    MTWR:1:1;
    MTWR:1:1;EHLV:4:2;OWNER:s:Name;
    QUAL:4:61;MTWR:1:1;
    
    99993 - Combo Card
    CreateTime:8:63468514981124;0_skill:2:30307;0_bonus:4:0;1_skill:2:20012;1_bonus:4:1;
    
    75462 - Avon Feather
    AFRR:4:501;AFRX:4:59324;AFRY:4:65499;AFLU:8:63458696614562;
    
    64047 - Jasper
    SCALE:f:1.000000;
    
    65006 - Fireball Crystal
    65007 - Ice Spear Crystal
    MFLEVEL:2:8;MFSTACK:1:5;
    MFLEVEL:2:1;MFSTACK:1:5;
    
    MetaData2
    =============================================================================
    
    67116 - Hillwen Engineering Bag
    EXCLUSIVE_BAG:s:/heulwen/;
    
    12021 - Earrings
    ATTMIN:2:2;

    Function

    MTWR : Metalware Grade
    AFR... : Avon Feather Region, X, Y, Time
    EVALUE : Extra Value (?)

     

  15. My curiosity finally overwhelmed me and I took a look at the possibility of custom skills.

    I added a new skill to the XML files in the client and our data files, by copying an existing one and changing the id. I gave it to me in-game and it appeared - so far so good - but I couldn't use it. For some reason the use button was disabled. Double checked some values, tried different id ranges, nothing. "Enabling" the skill with what we believe is some kind of "enable skill" packet? Nope :/

    I don't know what exactly is causing the use button to be disabled, maybe there's another file the skill has to appear in, or maybe the client has some hard coded checks for that. A journey into the client's code would probably help with this, but after a quick look I couldn't find anything that screamed "this is the problem!".

    Next up: Replacing existing skills. While it's possible to replace a similar skill, it's not possible to replace a passive skill with a usable one. Even though the use button wasn't disabled, it didn't do anything, the client didn't send the use packet. This confirms that something is missing, the client knows what skills are supposed to be usable, despite what skillinfo.xml says.

    So, for the moment, until we figure out what I missed, custom skills are a little tricky. Replacing existing ones isn't exactly viable I guess, but it is a possibility.

     

     

    • Like 3
  16. Does anybody still have a character with Eiry that hasn't been anywhere yet? I need the explanation dialogues from her, like when you enter Dugald and Alby, and who knows which other places. Also, when you enter special places, like banks and shops, she explains where you are right now when you speak to her and select Main Location. Basically I need all those dialogues. I can only get the repeating ones, because I've already been everywhere with my only Eiry char =/

    Just start logging, go into places, maybe talk to her to see if there's a special message, select Main Location just in case, save the log, and post it here.

  17. Originally posted on the old forum by Sairii, on 13 May 2015.

    Quote

    Monsters can hear you!

    ... or something like that.

    While looking through some AI's I've noticed the following options:

    
    "visualfield_radius" default="650"
    "audio_range" default="400"
    
    sensor visualfield_radius="%visualfield_radius" visualfield_angle="120" audio_range="%audio_range"

    So basically this would mean that the monsters have 2 different aggro ranges.
    I suspected this, tested this and pretty much confirmed it:

    uqWS9zW.thumb.jpg.e1517c94eef48f1a7194b3b0a3fdb0ac.jpg

    Top: faces to the left side
    Mid: faces to the left side
    Bot: faces to the right side

    So it has a 120° cone infront of it with 650 range detection and 400 everywhere else.

    Also the 650 range detection went into "doubt".
    While the 400 range detection went into "doubt" and IMMEDIATLY after that into "hate". Not even a second delay.

     

  18. Just a quick c&p from the chat, for future reference. (Originally posted on the old forum by me)

    the official locks in the skill db don't make sense ._. one time moving is locked on prepare, one time it's unlocked. what's the default??
     
    exectails 11:39
    things you've never paid any attention to, but suddenly need to know @_@
    I guess on prepare most stuff is being locked. attack seems to always be unlocked on ready, so I'm gonna assume attack is locked on ready still, together with changing equip and using items. gestures and starting certain skills doesn't work either, but that might be handled differently...

    Gold Strike, prepare: { lock: "Walk|Run" }, use: { unlock: "Attack" }
    
    during loading (prepare/loading)
    - can't change stance
    - can't walk or run -------------^
    - can't change equipment
    - can't use item
    - can't prepare skill
    - can't attack
    - can pick up and drop
    - can't talk to npc
    - can speak
    - can't use gesture (silent)
    - can't start rest, trying to start mana shield gives msg "can't use in this state"
    
    after loading (ready/wait)
    - can change stance
    - can walk and run
    - can't change equipment
    - can't use item
    - can prepare skill
    - can attack ----------------------------------------------^
    - can pick up and drop
    - can talk to npc
    - can speak
    - can't use gesture (msg that you can do it while having a skill loaded)
    - can't start rest, can start mana shield

    but then there's final hit, that doesn't have any locks specified... but you can switch equip and attack during ready. I guess that's hardcoded ~_~

    Just noticed attack is not unlocked on ready for Gold Strike, but on use, for Smash it's unlocked on both, but Smash is a combat skill, while Gold Strike is a usable skill. I guess that's the difference, Smash needs the unlock on ready to even be able to initiate the attack.

    windmill: use: { lock: "Hit" }
     
    I couldn't figure out what Hit means yet... you can still attack monsters and hit props, but... what if it means being hit? you can't be hit while wm is used, at least in classic combat? another skill that has this lock in "use" is blaze, which works just like wm's old invincibility afaik. assault slash has this lock during use as well, which makes sense, to not being able to hit you while you're jumping.

×
×
  • Create New...