Jump to content


  • Content count

  • Joined

  • Last visited

Distraught last won the day on March 17

Distraught had the most liked content!

Community Reputation

21 Good

About Distraught

Profile Information

  • Gender
  • Location

Contact Methods

  • Skype

Recent Profile Visitors

611 profile views
  1. open Block damage with selected vnum

    look for UseItemEx function in char_item.cpp and add to the begining: if(item->GetVnum() == 12345) { if(cannot_dead) ResetArmada(); else SetArmada(); }
  2. Equipment viewer for web + converter

    Hey guyz, I didn't find it anywhere so coded a new one. 1. Upload the files to your site. 2. Change IP and DB login data in the PHP file 3. Upload your item_list.txt and icon folder next to the PHP file. (convert all tga to png with the converter attached) 4. Call the PHP file xy.php?name=charactername (you can use like an iframe for ranklist, whatevs) Here's a converter too: Put your icon folder next to the exe and execute it. It will convert all tga image to png without changing the folder construction. All files are in the attachment.tga_to_png.rar eq_viewer_by_Distraught.rar
  3. 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
  4. 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; }
  5. 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.
  6. 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!
  7. 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
  8. Wolfman Enterpage

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

    its kinda similar
  10. open RemoveFromCharacter Game Core

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

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

    you can just easily set limittype 0 and 1, etc to have more limits at the same time
  13. 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/
  14. 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
  15. open Shop range showing distance

    sqrt((targetX-yourX)^2 + (targetY-yourY)^2)