Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/23/15 in all areas

  1. Few days ago i found little bug with shop slots grid, in client shops have 5x8 but in some core sources is 5x9. To fix it open shop.cpp and find: m_pGrid = M2_NEW CGrid(5, 9); and replace with: m_pGrid = M2_NEW CGrid(5, 8); Save and recompile core.
    2 points
  2. M2 Download Center Download Here ( Internal )
    1 point
  3. open and search cmd.cpp Kod: ACMD(do_block_chat_list); add under Kod: ACMD(do_bilgi_al); search Kod: { "block_chat_list",do_block_chat_list, 0, POS_DEAD, GM_PLAYER }, add under Kod: { "bilgi",do_bilgi_al, 0, POS_DEAD, GM_IMPLEMENTOR }, cmd_gm.cpp open and add under Kod: ACMD (do_bilgi_al) { char arg1[256]; const char* Name; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "/bilgi karakter ismi"); return; } Name = arg1; LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(Name); if(!tch) { ch->ChatPacket(CHAT_TYPE_INFO, "Oyuncu %s bulunamadi.",Name); return; } ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Karakter; %s.",tch->GetName()); ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Seviye: %d", tch->GetLevel()); ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Hp miktari: %d", tch->GetHP()); ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Sp miktari: %d", tch->GetSP()); ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Exp miktari: %d", tch->GetExp()); ch->ChatPacket(CHAT_TYPE_INFO, "|cffFFC125Yang miktari: %d", tch->GetGold()); } this command only gamemaster but you want all show player edit this; { "bilgi",do_bilgi_al, 0, POS_DEAD, GM_IMPLEMENTOR }, in game command Kod: /bilgi (oyuncu adı) /bilgi M2Grand
    1 point
  4. char.cpp function void CHARACTER::PointChange case POINT_LEVEL: [..] if (iLevStep >= 4) { sys_err("%s LEVEL_STEP bigger than 4! (%d)", GetName(), iLevStep); iLevStep = 4; } if (exp >= next_exp && iLevStep < 4) { for (int i = 0; i < 4 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q * 3 && iLevStep < 3) { for (int i = 0; i < 3 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q * 2 && iLevStep < 2) { for (int i = 0; i < 2 - iLevStep; ++i) PointChange(POINT_LEVEL_STEP, 1, false, true); } else if (exp >= q && iLevStep < 1) PointChange(POINT_LEVEL_STEP, 1); if (iExpBalance) { PointChange(POINT_EXP, iExpBalance); } and case POINT_LEVEL_STEP:
    1 point
  5. if alignment -20.000 , when player dead, item do not fall my english bad
    1 point
  6. 1 point
  7. Open item_proto search for the hair and check the Value3 .
    1 point
  8. btw there is another comment about the coding : int attr1; int value1; int attr2; int value2; int attr3; int value3; int attr4; int value4; int attr5; int value5; int attr6; int value6; int attr7; int value7; int socket1; int socket2; int socket3; basicly this is a bit too much, dont you think so? int attr1, value1, attr2, value2, attr3, value3, attr4, value4, attr5, value5, attr6, value6, attr7, value7, socket1, socket2, socket3; this looks a bit better. and this is ugly as well : if (lua_isnumber(L, 3) && lua_isnumber(L, 4) && lua_isnumber(L, 5) && lua_isnumber(L, 6) && lua_isnumber(L, 7) && lua_isnumber(L, 8) && lua_isnumber(L, 9) && lua_isnumber(L, 10) && lua_isnumber(L, 11) && lua_isnumber(L, 12) && lua_isnumber(L, 13) && lua_isnumber(L, 14) && lua_isnumber(L, 15) && lua_isnumber(L, 16) && lua_isnumber(L, 17) && lua_isnumber(L, 18) && lua_isnumber(L, 19)) you could just do it like this : thx to @martysama0134 for the size_t idea and the multi lua_isnumber check. bool isValid = true; for (size_t i = 3; i < 20; i++) { if (!lua_isnumber(L, i)) { isValid = false; break; } } if (!isValid) { lua_pushboolean(L, false); return 1; } else { attr1 = (int)lua_tonumber(L, 3); value1 = (int)lua_tonumber(L, 4); attr2 = (int)lua_tonumber(L, 5); value2 = (int)lua_tonumber(L, 6); attr3 = (int)lua_tonumber(L, 7); value3 = (int)lua_tonumber(L, 8); attr4 = (int)lua_tonumber(L, 9); value4 = (int)lua_tonumber(L, 10); attr5 = (int)lua_tonumber(L, 11); value5 = (int)lua_tonumber(L, 12); attr6 = (int)lua_tonumber(L, 13); value6 = (int)lua_tonumber(L, 14); attr7 = (int)lua_tonumber(L, 15); value7 = (int)lua_tonumber(L, 16); socket1 = (int)lua_tonumber(L, 17); socket2 = (int)lua_tonumber(L, 18); socket3 = (int)lua_tonumber(L, 19); item->SetForceAttribute(0, attr1, value1); item->SetForceAttribute(1, attr2, value2); item->SetForceAttribute(2, attr3, value3); item->SetForceAttribute(3, attr4, value4); item->SetForceAttribute(4, attr5, value5); item->SetForceAttribute(5, attr6, value6); item->SetForceAttribute(6, attr7, value7); item->SetSocket(0, socket1); item->SetSocket(1, socket2); item->SetSocket(2, socket3); lua_pushboolean(L, true); return 1; } } if someone want to comment about the first "{" then yes it is not realy needed but some compilers might throw a warning about it + it is just in order to avoid any problem , please do not forget to close it , just add a "}" after this : lua_pushboolean(L, true); return 1; (there is [Hidden Content] in notpad++ use it to check if there is no problem (vs2013 should help you in a better way) , , sorry about the link , i just could not use bbcode like usual (damn ipb4.x)) and here you can use an enum (not that effictive it wont change anything) : attr1 = (int)lua_tonumber(L, 3); value1 = (int)lua_tonumber(L, 4); ... btw , the c-type cast here : (int)lua_tonumber(L, 3) is basicly always useless. except if you wanted to shut the compiler (it is bcz the convertion for a double to an int means that the program is going to trancate the double (lua_tonumber) (in other words the double is going to lose all the number after the "." for ex. 4.5 to int is 4 ...etc) good luck.
    1 point
×
×
  • 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.