Jump to content

Cataclismo

Premium
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Everything posted by Cataclismo

  1. At first read some contents please. Kind Regards Ken ~ TA (uint32_t)-1 What's that?
  2. If you can see in he loaded experience table with maximum value of 4,278,420,394 which is much higher than your max. My guess is that you redefined type DWORD or is already defined wrong which would be strange. If you redefined DWORD then restore it. If you didn't then in config.cpp change DWORD exp = 0; to unsigned long exp = 0; Build game, start server and the most important step: test if the experience is correct by leveling in game!
  3. I like clean code . I cleaned the source a lot xD Glad to help. It's not an error, it's more like display problem (in game everything should work). When your DWORD has same size as int (clearly has) you can go to config.cpp and change DWORD exp = 0; to long int exp =0; if you need bigger size you can use long long int but then you'll have to replace every %ld with %lld It's not really recommended to do this. The experience table is type DWORD (and DON'T change the type if you don't know what you're doing) which is an unsigned long. Maximum value of DWORD can be 4,294,967,295. If you wrote in experience table a value bigger than 4,294,967,295 then the things will fuck up. Try to adjust experience to fit in this value. Edit the rates of your server to fit in those values too.
  4. Well, you can delete it from client. That's the easy way. You will need: 1.New image for equipment without belt slot. You can get one from old clients 2.In root: new uiinventory.py without belt system. You can get one from a client without belt too. 3.In locale_xx/xx/ui: new inventorywindow.py.Same, from a client without belt system (from same client with uiinventory.py is recommended).
  5. Here's an improved version of experience table. In constants.h search for extern const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1]; And change it to extern DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1]; In constants.cpp search for const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1] = { ... } And change it to DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1] = { ... } Now search in config.cpp for #include <sstream> And add under #include <fstream> Still in config.cpp search for TOKEN("mark_server") And add above or under it TOKEN("exp_table") { if (strlen(value_string) > 0) LoadExpTable(value_string); continue; } Still in config.cpp search for static void FN_log_adminpage() And add above or under it void LoadExpTable(char* name) { std::ifstream f(name); printf("EXP_TABLE load: %s n", name); if (!f.is_open()) { printf("EXP_TABLE load: FILE %s OPEN ERROR", name); return; } int level = 0; DWORD exp = 0; int line = 0; while (!f.eof()) { f>>level; f>>exp; line++; if (level <= 0 || exp <= 0) printf("EXP_TABLE load !ERROR!: LINE %d LEVEL %d EXP %ld n", line, level, exp); else if (level > PLAYER_EXP_TABLE_MAX) printf("EXP_TABLE load !ERROR!: LINE %d LEVEL %d > MAX EXP LEVEL %dn", line, level, PLAYER_EXP_TABLE_MAX); else { printf("EXP_TABLE load: LINE %d LEVEL %d EXP %ld n", line, level, exp); exp_table_common[level] = exp; } } printf("EXP_TABLE load: done n"); } So, a short description: If you want to edit experience table you have to add in CONFIG of each channel EXP_TABLE: /path/to/file/exp_table.txt The file can be anywhere, but you must have the rights to read it. You can edit experience for the levels you want. You don't need to change all levels. Also, the levels can be in any order you want. That's the structure of the file: 1 2000 2 10000 89 10 5 0 7 30 The first column is for levels and the second is for experience. Between them can be space or tab or even new lines (but it must be one after another). For the file I specified above you should get this in PuTTy or any SSH client you use (at the end of MAP_ALLOW probably): EXP_TABLE load: /path/to/file/exp_table.txt EXP_TABLE load: LINE 1 LEVEL 1 EXP 1000 EXP_TABLE load: LINE 2 LEVEL 2 EXP 20000 EXP_TABLE load: LINE 3 LEVEL 89 EXP 10 EXP_TABLE load !ERROR!: LINE 4 LEVEL 5 EXP 0 EXP_TABLE load: LINE 5 LEVEL 7 EXP 30 EXP_TABLE load: done As you see if you specify 0 exp for a level it just skip it (as i did for level 5, line 4). Also, if the file is empty or does not exists it will not load it. Tip: I added lines to be easier for you to find where you did something wrong EDIT: Add check for level. Have fun.
  6. What you wanna check with this? if(msg.get() && msg->Get()->uiAffectedRows == 0 || pmsg->Get()->uiAffectedRows == (uint32_t)-1) You're trying to check if the ban command worked? If yes, use this: if (msg->Get()->uiAffectedRows > 0) ch->ChatPacket(CHAT_TYPE_INFO, "User %s has been blocked.", arg1); else ch->ChatPacket(CHAT_TYPE_INFO, "Command failed."); Also, why?! pmsg->Get()->uiAffectedRows == (uint32_t)-1 Are you trying to check if uiAffectedRows is -1, but you convert -1 to unsigned? WTF!
  7. That's interesting, but what if your client gets unpacked? This system could be disabled easy. And don't tell me things like "it won't be unpacked". Clients are unpacked easy. You could try to do this system in C++ for the source. You could add a real chat block. And one more thing: if you write too fast the server will automatically disconnect you.
  8. As I know this is quite "normal". I mean its happening on every kind of game rev. I saw that on every kind of server that I made or I played. I don't know exactly the problem, but I guess it's because the size of item is too small and he can't actually "touch" the mob. My assumption is that is a client problem. If you use the hack called "SendAttackToTarget" or any other like it you will see that the mob will take damage for every "hit". Maybe it's a model problem or a launcher problem. I don't know for sure and I don't know the solution either. Sorry.
  9. I tried the function of that topic but i am this eroor . cmd_gm.cpp: In function 'void do_ban(CHARACTER*, const char*, int, int)': cmd_gm.cpp:4407: error: 'arg1' was not declared in this scope cmd_gm.cpp:4407: error: 'arg2' was not declared in this scope cmd_gm.cpp:4407: error: 'arg3' was not declared in this scope cmd_gm.cpp:4446: error: 'pmsg' was not declared in this scope Makefile:119: recipe for target 'OBJDIR/cmd_gm.o' failed gmake: *** [OBJDIR/cmd_gm.o] Error 1 root@metin2:/usr/src/Server/game/src # cmd_gm.cpp:4446: error: 'pmsg' was not declared in this scope Well, this variable does not exists in the code. So you probably tried another tutorial or you edited it. Also, you did not declared variables arg1, arg2, arg3: char arg1[256], arg2[256], arg3[256]; After AMCD(do_ban) {
  10. This is for ban: For unban I guess you can work around with the ban command and make one.
  11. You should check this: Read what that guy said and how it will work.
  12. If I understood well the source ( I didn't tested yet ), the solution you tried is quite stupid. if (npc != QUEST_NO_NPC) m_mapNPC[QUEST_NO_NPC].OnKill(*pPC); This extra function will also do a extra call, so more triggers. Try this - not tested and if it works let us know: Find this ( SAME function you posted ): if (m_mapNPC[QUEST_NO_NPC].OnKill(*pPC)) return; if (leader) { m_pCurrentPartyMember = ch; m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID())); } And comment it. Try to test if it's still bugged. This also may cause another bug: the function may not trigger at all! So test it in all ways possible. Kill a player and then a mob.
  13. Open packet.h from server and Packet.h from client and check every packet if they are the same ( have to be the same in both files ) - that means the number of the variables and their type. Some packets may not have the same name so you have to figure out which packets have to be the same. But this may not resolve all the problems.
  14. She had do disappear because that person said he will call the police? No way. If you would do that in Romania (my country) the police (or whatever security service you may call) would laugh at you. Whatever. I hope Vanilla is ok.
  15. I don't get what you're exactly saying, but I've tried to call my function using these two ways: CMyClass::instance().Initialize(); and CMyClass mc; mc.Initialize();
  16. Hi, So, as the title says my client launcher is crashing when I initialize a variable. I declared a class like this: class CMyClass : public CSingleton<CMyClass> { private: int var; public: void Initialize(); } And the function Initialize(): void CMyClass::Initialize() { var = 123; } No error at compilation, but when I run the launcher it's crashing. I don't get it. Why is this happening?
  17. You forgot to translate this. Nice tutorial, btw. Also, I wonder... are you trying to prove something?
  18. item_addon.cpp void CItemAddonManager::ApplyAddonTo(int iAddonType, LPITEM pItem) { // here's the code you have to modify... }
  19. Server: mainline_released Client: novaline Skills are working, but only at M1. You CAN'T make horse skills P. That's why skills don't do damage. Have you ever seen a server where you can make horse skills P? Probably not. It's not impossible, but I guess you have to work with DB & server. Until then, just make them M1 and give it a try.
  20. One simple question: for channels to talk to each other needs the same port? I mean P2P_PORT has to be the same in all channels?
  21. Are you serious? That's quite stupid, you know? Also, I've provided a solution above. Check it out. I think it's the only reasonable solution
  22. quest tested begin state start begin when kill with npc.is_pc begin if pc.is_pvp() then say("test") return end end end end Still bugged. You know why? I start a duel with you, but I kill your friend. I will still get the message (I shouldn't!!).
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.