Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

20 Good

About Distraught

  • Rank
  • Birthday 01/23/1998

Profile Information

  • Gender
  • Location

Contact Methods

  • Skype

Recent Profile Visitors

530 profile views
  1. item and mob_proto editor (for txt)

    Hey guyz, I just made a lil tool for the community. You can edit your item and mob_proto.txt with as a table. Put those txt files next to the program. There's some kinda run query function in it. You can run the simplest queries with it like "update Level*10" which will multiplicate all the Level values by 10. Only update function is available yet and without where. Operators you can use: +, -, *, /, = Download
  2. oh really, that's right and he also missed this check too so that's why the big difference in runtime if (!it->second.pCharacter) { ++it; continue; }
  3. Acutally you both are right. @metin2-factory says the ++i is running faster than the i++. It's true because i++ stores the old value and returns that and after adds 1 to the value of i. ++i only adds 1 and doesn't store the old value. BUT @Tasho is also right. I checked the runtime of both of our code (ran it 1.000.000 times and then calculated an average value). His code runs about 2x times faster than mine because of the optimalizations he did.
  4. Hey guyz, Today I made a small release. It's a new LUA function to check if all the members of the party have the specified item (and then it removes it). Let's start to make it work! Open party.h and search for: GetMemberMinLevel(); After add this: bool CheckItem(int targyID); Save and close the file. Open party.cpp and and the code below the function GetMemberMaxLevel: bool CParty::CheckItem(int targyID) { int dbszam = 0; itertype(m_memberMap) it = m_memberMap.begin(); while (it!=m_memberMap.end()) { if (!it->second.pCharacter) { ++it; continue; } if(it->second.pCharacter->CountSpecifyItem(targyID) > 0) dbszam++; ++it; } if(GetNearMemberCount() <= dbszam) { itertype(m_memberMap) it2 = m_memberMap.begin(); while (it2!=m_memberMap.end()) { if (!it2->second.pCharacter) { ++it2; continue; } if(it2->second.pCharacter->CountSpecifyItem(targyID) > 0) it2->second.pCharacter->RemoveSpecifyItem(targyID); ++it2; } }else{return false;} return true; } Save the file and close it. Open questlua_party.cpp and add this function: int party_check_item(lua_State* L) { DWORD item_vnum; if (lua_isnumber(L,1)) { item_vnum = (DWORD)lua_tonumber(L, 1); } else { lua_pushboolean(L, 0); return 1; } LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch->GetParty()) lua_pushboolean(L,ch->GetParty()->CheckItem(item_vnum)); else lua_pushboolean(L, 0); return 1; } Add the line below after { "is_in_dungeon", party_is_in_dungeon }, { "check_item", party_check_item }, Compile the game and we're done. In quests it will return a boolean value. You can use it like: if party.check_item(72702) then d.join(207) end In this case it checks if all the party members have the item with the ID of 72702 and then it removes from them and warps them to the dungeon. Don't copy it or at least mention my name!
  5. Quest checker

    Hey guyz, I made a quest checker that reads your quest and if it has any error then the program shows so. Download
  6. Wolfman Enterpage

    Hey guyz, I just made a simple but sexy enterpage. Demo Download Feel free to use
  7. open Warrior's tattoo

    its kinda similar
  8. open RemoveFromCharacter Game Core

    when u get this error? ath throwing items out?
  9. open Core is shutting down, why?

    compile your game without stripping it and then debug it to let us see what happened
  10. python Needing STATs instead of LVL

    you can just easily set limittype 0 and 1, etc to have more limits at the same time
  11. open Help for editing C++

    coding new systems is not a magic, start learning c++ and you'll be able to do so http://www.cplusplus.com/doc/tutorial/
  12. open Item giving armor shining

    in the pythinnetworkstreamphasegamitem.cpp modify case ARMOR_RING like this: case ARMOR_RING: CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(kSpecialEffect.vid); pInstance->CInstanceBase::ArmorRing(); break; may it gonna work
  13. open Shop range showing distance

    sqrt((targetX-yourX)^2 + (targetY-yourY)^2)
  14. open Restrict items on QuickSlots

    open char_quickslot.cpp and search for: if (pItem->IsDragonSoul()) return; modify: if (pItem->IsDragonSoul() || pItem->GetVnum() == YOURITEMID) return; If you wanna add more items: if (pItem->IsDragonSoul() || pItem->GetVnum() == YOURITEMID || pItem->GetVnum() == YOURITEMID2 || pItem->GetVnum() == YOURITEMID3) return; I'm working now so I couldn't test it, but I think it's gonna work.
  15. open Mobs attack bug

    then search for BeginAttack or something like that in char_battle.cpp and check that