Jump to content

Mind Rapist

Active Member
  • Posts

    548
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    0%

Everything posted by Mind Rapist

  1. Most probably a Python problem, unless it appeared once you compiled something. What does your syserr say?
  2. I removed all the extra steps and left only what the post shows. Then I followed the steps above for char.cpp and PythonNetworkStreamPhaseGame.cpp. The problem is still here with a little difference... Now the horse stats are displayed only when during the logout, character rides a horse. I just don't get it we tried everything. EDIT: Ok that was my bad actually. The problem is fixed!!! I forgot to change for (int i = POINT_ST; i < POINT_IQ + 1; ++i) pack.points[i] = GetRealPoint(i); in PointsPacket() was: for (int i = POINT_ST; i < POINT_MAX_NUM; ++i) pack.points[i] = GetPoint(i); but now I believe it's all right! Thank you so much for your time. Lots of respect not just for helping me find a solution but also for not giving up on me. Cheers to you man
  3. Thanks. I tried it but it didn't work. I tried adding the PointChange(POINT_X, 0) at the top of the function and then I tried it right above the packet initialization, none worked. I also tried the PointsPacket.points in PythonNetworkStreamPhaseLoading.cpp and then I tried again with PointsChange.point_XX from the new packet you showed me, where PointsChange = TPacketGCPointChange PointsChange. None of these worked.
  4. Have a look at questlua_affect.cpp->int aff_affect(lua_state * L) int affect_add(lua_State * L) { if (!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3)) { sys_err("invalid argument"); return 0; } CQuestManager & q = CQuestManager::instance(); BYTE applyOn = (BYTE) lua_tonumber(L, 1); LPCHARACTER ch = q.GetCurrentCharacterPtr(); if (applyOn >= MAX_APPLY_NUM || applyOn < 1) { sys_err("apply is out of range : %d", applyOn); return 0; } if (ch->FindAffect(AFFECT_QUEST_START_IDX, applyOn)) // 퀘스트로 인해 같은 곳에 효과가 걸려있으면 스킵 return 0; long value = (long) lua_tonumber(L, 2); long duration = (long) lua_tonumber(L, 3); ch->AddAffect(AFFECT_QUEST_START_IDX, aApplyInfo[applyOn].bPointType, value, 0, duration, 0, false); return 0; } where L1 = affect ID, L2 = affect value, L3 = duration. If you use /stun MyChar as a GM and you refresh player.affect in the database you will see a new affect under the dwPID of the character stunned. The bApplyOn value is the id of the affect in the system (our case 210). If you want to check your affect ids, open the file affect.h in game/src and search for the following: enum EAffectTypes { AFFECT_NONE, AFFECT_MOV_SPEED = 200, AFFECT_ATT_SPEED, AFFECT_ATT_GRADE, AFFECT_INVISIBILITY, AFFECT_STR, AFFECT_DEX, // 205 AFFECT_CON, AFFECT_INT, AFFECT_FISH_MIND_PILL, AFFECT_POISON, AFFECT_STUN, // 210 AFFECT_SLOW, AFFECT_DUNGEON_READY, AFFECT_DUNGEON_UNIQUE, ... As you can see, the ids start from 200 and go on. The AFFECT_STUN is the 10th in the row, which gives it the ID of 210. To be sure, open your affect.h and see your ID of AFFECT_STUN. I also saw that you changed the value (0->1). The value on this affect is not important as it can only be a true (exists on the database table) or false (not found in the database table) I hope this helps
  5. I'm gonna make this as simple as it gets. Run the following commands as root: #service mysql-server stop #cd /var/db #tar -zcvf mysql.tar.gz ./mysql #rm -rf ./mysql Reboot your machine. Once mysql-server service runs without a /var/db/mysql folder, it automatically creates it's own. Run these now: #service mysql-server stop #/usr/local/bin/mysqld_safe --skip-grant-tables & #mysql -u root mysql > INSERT INTO mysql.user (host, user, password, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, reload_priv, shutdown_priv, process_priv, file_priv, grant_priv, references_priv, index_priv, alter_priv, show_db_priv, super_priv, create_tmp_table_priv, lock_tables_priv, execute_priv, repl_slave_priv, repl_client_priv, create_view_priv, show_view_priv, create_routine_priv, alter_routine_priv, create_user_priv, event_priv, trigger_priv, create_tablespace_priv) VALUES ('%', 'root', PASSWORD('your-remote-root-password'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',); > flush privileges; > exit; #killall mysqld #service mysql-server start WARNING: I'm using Maria-DB, not MySQL, which I'm strongly suggesting to do as well. If not, your system may defer from mine. There for you should check the INSERT command and modify it according to your fields. To see your fields type the command below right before INSERT INTO SELECT * FROM mysql.user; If you run this and see that a root user with % host is already there, INSERT won't work. Instead, change the password like this: > UPDATE mysql.user SET password=PASSWORD('your-specified-password') WHERE user='root'; and after that continue as displayed above. When this is done and you check that you can log in MySQL from Navicat (or your software) copy the tar file in /var/db into your local drive and open it. In your FTP software, go in the folder /var/db/mysql and drag & drop everything from your tar file EXCEPT mysql folder!!! All this until now will definately solve your mysql database problem. For the other databases, download other Serverfiles and replace the tables that cannot be fixed. But again, DO NOT TOUCH mysql FOLDER! You can download any SF you want (Fliege, Maxmi, Invoice), the databases should be the same. I hope this was helpful. Best regards
  6. There are 2 ways to do this. 1) Direct quest edit PROS: Quick, simple fix, anyone can do it Bypasses immunity CONS: Not as stable as 2nd way 2) Source edit PROS: Stable solution Your very own lua function on stunning people CONS: Does NOT bypass immunity (people with immunity attribute on their shield won't be affected by this) More advanced implementation (recommended to back-up files, more advanced knowledge needed to edit according to your specifications) Not tested (by me) This method will require you to compile a new QC file (add the new command in game/src/quest/quest_functions and then gmake -j20 in that directory) Direct quest edit solution In this example I will be using the item by vnum 31001 stun_quest.lua: Source edit solution Go to game/src and edit the following in questlua_affect.cpp: I hope you found this helpful. Again, the second way is not tested and could be bugged (but I don't think so) Best regards
  7. Thank you so much for these information they were very helpful, but my goal is not to hide the horse stats in general, just in character select. I'm trying to hide them the same way item attributes are hidden: hidden in character select, showing everywhere else. What I did with the client and the packet set in Disconnect() came from this post:
  8. Thanks for the reply. I hate to ask but since I'm not too familliar with the whole system yet, can you give me an example please?
  9. I tested it and it didn't quite work. So I already had a packet in char.cpp->void CHARACTER:: Disconnect(const char * c_pszReason) and I changed it like this: packet_point_change pack; pack.header = HEADER_GC_CHARACTER_POINT_CHANGE; pack.dwVID = m_vid; pack.type = POINT_PLAYTIME; pack.value = GetRealPoint(POINT_PLAYTIME) + (get_dword_time() - m_dwPlayStartTime) / 60000; pack.amount = 0; pack.point_ST = GetPoint(POINT_ST); pack.point_DX = GetPoint(POINT_DX); pack.point_HT = GetPoint(POINT_HT); pack.point_IQ = GetPoint(POINT_IQ); GetDesc()->Packet(&pack, sizeof(struct packet_point_change)); if (GetHorseST() > GetPoint(POINT_ST)) PointChange(POINT_ST, GetHorseST() - GetPoint(POINT_ST)); if (GetHorseDX() > GetPoint(POINT_DX)) PointChange(POINT_DX, GetHorseDX() - GetPoint(POINT_DX)); if (GetHorseHT() > GetPoint(POINT_HT)) PointChange(POINT_HT, GetHorseHT() - GetPoint(POINT_HT)); if (GetHorseIQ() > GetPoint(POINT_IQ)) PointChange(POINT_IQ, GetHorseIQ() - GetPoint(POINT_IQ)); and then I changed this in UserInterface/PythonNetworkStreamPhaseLogin.cpp: for (DWORD i = 0; i < POINT_MAX_NUM; ++i) { CPythonPlayer::Instance().SetStatus(i, PointsPacket.points[i]); TPacketGCPointChange PointsPacketChange; if (i == POINT_LEVEL) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointsPacket.points[i]; else if (i == POINT_ST) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byST = PointsPacketChange.point_ST; else if (i == POINT_HT) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byHT = PointsPacketChange.point_HT; else if (i == POINT_DX) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointsPacketChange.point_DX; else if (i == POINT_IQ) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointsPacketChange.point_IQ; } and I edited the packet.h files of course. The result was that not only the problem continued to exist, but once the client starts, if the character logs out once with horse stats they are displayed each time they do, even if they don't ride a horse the next time! And not only that, when the character rides a horse in game, the HT, IQ, ST and DEX get updated but HP and SP are not updated!
  10. So if I did something like this in questlua_pc.cpp->int pc_give_or_drop_item(lua_State* L) LogManager::instance().QuestRewardLog(pPC->GetCurrentQuestName().c_str(), ch->GetPlayerID(), ch->GetLevel(), dwVnum, icount); if (dwVnum->IsStackable() && !IS_SET(dwVnum->GetAntiFlag(), ITEM_ANTIFLAG_STACK)) { BYTE bCount = dwVnum->GetCount(); for (int i = 0; i < INVENTORY_MAX_NUM; ++i) { LPITEM item2 = ch->GetInventoryItem(i); if (!item2) continue; if (item2->GetVnum() == item->GetVnum()) { int j; for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j) if (item2->GetSocket(j) != dwVnum->GetSocket(j)) break; if (j != ITEM_SOCKET_MAX_NUM) continue; BYTE bCount2 = std::min(200 - item2->GetCount(), bCount); bCount -= bCount2; item2->SetCount(item2->GetCount() + bCount2); if (bCount == 0) { LPITEM item = ch->AutoGiveItem(dwVnum, icount); } } } would that work or I'm missing something?
  11. Would you mind showing us how can we fix this too?
  12. Thank you so much for your reply. I searched in the files you mentioned and I found the check that handles this character in parser.cpp else if (c == ';') { isValue = true; } I tried changing this to false but the result was not what I expected... I do not understand the most out of the code yet so I have to ask for a simple example. I thought maybe sending signal-character will do the trick. For example, I send ^ and write another check in this function that replaces ^[SPACE][END-OF-LINE] with the character. The only problem is that I don't know how to edit the string's characters so I'm gonna have to request an example. Again, thank you so much for the reply, it really helped a lot.
  13. I've noticed this one since the beginning but for some reason I've been waiting until now to ask. Let's say I'm writing a dialog with NPC X and when I click on it I want it to say: Hi, how are you today; So I'm writing the classic when XXXXXX.chat."Hi, how are you today;" and I'm compiling but when I click in the game the ; is missing! So it just says: Hi, how are you today I haven't yet find what filters the character so I'm asking you. I've looked in questlua.cpp and questlua_global.cpp but didn't find anything. If anyone knows I'm also trying to find a way to increase the dialog width (after a line ends, there is just soooo much right padding!)
  14. I have those lines in my Client source PythonNetworkStreamPhaseLoading.cpp -> bool CPythonNetworkStream::__RecvPlayerPoints() for (DWORD i = 0; i < POINT_MAX_NUM; ++i) { CPythonPlayer::Instance().SetStatus(i, PointsPacket.points[i]); if (i == POINT_LEVEL) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointsPacket.points[i]; else if (i == POINT_ST) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byST = PointsPacket.points[i]; else if (i == POINT_HT) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byHT = PointsPacket.points[i]; else if (i == POINT_DX) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointsPacket.points[i]; else if (i == POINT_IQ) m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointsPacket.points[i]; } PythonNetworkStreamPhaseGame.cpp -> bool CPythonNetworkStream::RecvPointChange() case POINT_PLAYTIME: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].dwPlayMinutes = PointChange.value; break; case POINT_LEVEL: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointChange.value; __RefreshStatus(); __RefreshSkillWindow(); break; case POINT_ST: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byST = PointChange.value; __RefreshStatus(); __RefreshSkillWindow(); break; case POINT_DX: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointChange.value; __RefreshStatus(); __RefreshSkillWindow(); break; case POINT_HT: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byHT = PointChange.value; __RefreshStatus(); __RefreshSkillWindow(); break; case POINT_IQ: m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointChange.value; __RefreshStatus(); __RefreshSkillWindow(); break; But there is a problem with this code. If I'm riding my horse, it returns the stats the character has while riding. For example if a character has INT: 6 and starts riding, the 6 will become 38. If this code executes while the character is riding the horse, POINT_IQ will return 38 instead of the real INT (6). Is there any way to get the real values?
  15. I'm having the bug showing on the video (watch left window). The shaman targets an NPC, therefore, if she performs a buff skill, she will get the buff. But only her client will see the skill's effect on her body, everybody else will see the effect on the NPC's body. Can someone post or link a fix please?
  16. I need all these as well... It's a whole new re-construction of the skills! Also, Lasting fire has a new, more realistic effect on character body.
×
×
  • 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.