Jump to content

eressea

Legendary Member
  • Posts

    534
  • Credits

  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Everything posted by eressea

  1. This is pure evil, DON'T WRITE IT THIS WAY :) Yes, use the ternary operator or use the first (longer) way. Why? It's very simple. When someone else goes (or you go after few months) through your code and wants to add something to one of conditional branches, it could end up this way and nobody will probably notice until weird things happen: if (condition) _var = 1; else _var = 2; _var2 = 3; Of course the same applies for C/C++.
  2. I've just found and fixed one "small" bug https://bitbucket.org/l2shrine/extender-public/commits/9d2273e5c373eda9b087ef70f78999d42fc30ed8 Please download compiler again to get the newest fixed version http://download.l2shrine.com/compiler.zip
  3. Thanks for answer! Do you have any source? Or did you test it on Official server?
  4. Thanks for info! Going to fix this when I have some time for it...
  5. Hi, you don't need have the server running (but it can run, it doesn't matter), just run (in command line): l2npc.exe file.nasc and it should compile. Just make sure you're in the right folder etc. Also some news, I've uploaded new version of the compiler http://download.l2shrine.com/compiler.zip and now it should be FULLY COMPATIBLE WITH ADVEXT. I've added all functions, handlers, CreatureData2 type and all new variables, so have fun :) The source is still on bitbucket https://bitbucket.org/l2shrine/extender-public
  6. I've added stubs for all new AdvExt functions: https://bitbucket.org/l2shrine/extender-public/commits/746b743bba9d2bb46bc74dc45a1317fa7129ab39 Next step is adding stubs for new AdvExt handlers and variables, then it should compile with 100% compatibility with AdvExt! :) EDIT: Handlers added, now just those variables... It will be bit harder than handlers :)
  7. Nice beginner guide! :) Btw, you should use parentheses in WHERE columname = 'value' OR columname = 'value' AND columnname = 'value'...
  8. I have started learning this 03/2016. I had almost zero win32 knowledge (in fact you need some 10 functions), I had little knowledge of debugging in anything else than gdb (with debug symbols; no asm, just C/C++), and my assembler skills were 20 years old (back then, it was just real mode of x86, not even 80386 protected mode and definitely not x64 asm, that was really new for me; nevertheless it's in fact less difficult than reading x86 asm because it uses just only one calling convention versus 3 different calling conventions on x86). Ok, I have some 15+ years of C and 10+ years of C++ but that was all MSDOS, Linux, BSD and iOS stuff :) So, lin2admin, you can learn it very fast if you're patient, inquiring and have some solid programming background. If you're able to write, let's say, HTTP server in C++, you'll be probable able to learn all this. If you're not, go start with it - write me a simple multithreaded HTTP server, it's nothing difficult and it's much easier than starting with writing extender ;)
  9. Hi everyone, I've made a brand new AI compiler for Gracia Final based servers (based on l2npc.exe) Download: http://download.l2shrine.com/compiler.zip Source: https://bitbucket.org/l2shrine/extender-public (the compiler is part of MyExt64 open source extender) Some basic info it uses the official NASC syntax for Gracia Final, so use class a : b, not class 0 a : b and define set_compiler_opt base_event_type(@NTYPE_NPC_EVENT) or set_compiler_opt base_event_type(@NTYPE_MAKER_EVENT) use UTF-16LE input files use myself.something, not myself::something it should work the very same way as AdvExt compiler including all new functions, variables, handlers and types they've added it also accepts PSTATE_, MSTATE_ ... constants if you run l2npc.exe without command line parameters, it runs as a standard l2npc.exe (with MyExt64 extender) if you run l2npc.exe with command line parameters, it runs as a compiler Enjoy!
  10. Your repository is private (or at least I can't see it)
  11. Hi, I have a very simple question. When using leaked Gracia Final, pets of characters registered in castle siege still lose exp in siege zone. Is this "correct" behaviour? Did NCsoft change it in any future version? Does anyone remember anything related to this? Thanks :)
  12. Just a wild guess (until you send some picture), what address do you have in lin2db.dbo.server in column ip? If it's 127.0.0.1, you need to put your LAN IP there - you can obtain it from ipconfig
  13. Got it! https://bitbucket.org/l2shrine/extender-public/commits/5292c28a57e8ee4b4eba641c4692be6afa203f46 Is this really what guys from AdvExt sell for $100 with key lock? I'll try to add support for constants like PSTATE_IDLE soon... Also I'll write new topic about the compiler soon (with how to use etc)
  14. You can either edit it manually in ai.obj (it's not easy but it works if you do it well) or decompile and recompile it. At the moment there is probably only one REALLY working decompiler made by Sauron as mentioned here http://www.maxcheaters.com/topic/203399-myext64-my-new-opensource-gracia-finalepilogue-extender/page-12?do=findComment&comment=2609299 and one working compiler that can be bought from AdvExt. I'm currently trying to implement the compiler too so it would be free for anyone...
  15. Ok, I'm going to try it. I'm working with l2npc - extending it and calling code that invokes compilation instead of loading AI and spawning NPCs :) So far: Allocated some space for the lexer/parser instance Called constructor @ 0x5C9980 on parser instance Called function @ 0x5BE2B4 on parser instance with parameter L"citizen.nasc" (prepares input file, returns true which means ok) Called function @ 0x419D84 with parameter "ai.obj" (creates output file) Called function @ 0x419E40 with parameters sizeof(void*), 69, 79, 2, 2, 0 (writes header) NOW I'M MISSING SOMETHING HERE Called function @ 0x5D7F70 on parser instance (compiles the program, returns 0 which means ok) Checked UINT32 @ 0x37886C0 (error count, is 0 now) Now it would have been done if I didn't miss the step I'm still missing ... work in progress ... If anyone has any additional info, let me know :) If I manage to make functional compiler for GF, I'll make it part of MyExt64 (so it will be open source).
  16. Ah, then good job :) I've looked into your code (thanks for added pdb file :)) and I've noticed this: you should call srand only once you shouldn't use just time() as parameter to srand, use something like srand(time(0) + _getpid()) or you'll generate the same password on two different machines when you run it in the same second you should get the characters from one string like "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", not from 10 different "random" strings you should generate the result to some std::string (just push_back those chars there until you have password long enough) Simply (pseudocode, not tested): #include <windows.h> #include <string> #include <stdlib.h> int main(int argc, char **argv) { srand(time(0) + _getpid()); // it would be better to obtain some more random seed - in UNIX, you should get this value from /dev/random std::string result; const std::string chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for (size_t i = 10 ; i ; --i) { result.push_back(chars[rand() % chars.size()]); // even this could be written better, using lowest bits isn't good for some pseudorandom generators } std::cout << "Random password: " << result << std::endl; return 0; }
  17. If you don't mind installing Python (btw, even if you can't code in it, it's the best available calculator) #!/usr/bin/env python CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" LENGTH = 10 from random import seed, choice seed() print "".join([choice(CHARACTERS) for i in xrange(LENGTH)]) Or maybe even better (taking length and chars from commandline arguments): #!/usr/bin/env python from sys import argv, stderr from random import seed, choice def usage(): print >> stderr, "Usage: %s [LENGTH] [CHARACTERS]" % (argv[0], ) raise SystemExit(1) LENGTH = 10 CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" if len(argv) > 3: usage() if len(argv) == 2 and argv[1] in ["-h", "--help", "/h", "-?", "/?"]: usage() if len(argv) > 1: try: LENGTH = int(argv[1]) except: usage() if len(argv) > 2: CHARACTERS = argv[2] seed() print "".join([choice(CHARACTERS) for i in xrange(LENGTH)])
  18. Replaced e_guard_MOrc_m00 with bit different model :)
  19. 30584 LineageNPC.e_guard_MOrc LineageNPCs.e_guard_MOrc_m00 4 LineageNPCsTex.e_guard_MOrc_m00_t00_b00 LineageNPCsTex.e_guard_MOrc_m00_t00_b01 LineageNPCsTex.e_guard_MOrc_m00_t00_f LineageNPCsTex.e_guard_MOrc_m00_t00_h 0 2 4416 17 1.20000005 0 3 ItemSound.fist_1 ItemSound.fist_2 ItemSound.fist_3 5 ItemSound.armor_metal_strong_2 ItemSound.armor_metal_strong_5 ItemSound.armor_metal_strong_8 ItemSound.armor_metal_alt_7 ItemSound.armor_metal_weak_5 3 ChrSound.MNpc_Giant_Dmg_1 ChrSound.MNpc_Giant_Dmg_2 ChrSound.MNpc_Giant_Dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 0 0
  20. Seems like Vapook (and the other Orcs sharing the same model) is the problem http://download.l2shrine.com/vapook-golkonda.png But why and what can I do with it? :D
  21. Yes, it's 91. If you wear it, it's ok. Also Longhorn Golkonda wears it without any problem - so it seems like there's some problem with Vapook?
  22. I plan to implement everything from Epilogue, including mailing system, item refund and all new needed NPCd functions - I just can't tell you when.
  23. What do you want to learn? How to run server with extender made by someone else? How to change items, npcs, quests, ...? Or writing your own extender? What chronicle are you interested in?
  24. In leaked GF you would write {[escape_scroll_giran];5} but I'm not sure whether C4 can parse this correctly. What if you put it there 5 times as [escape_scroll_giran]?
×
×
  • Create New...