[HELP]Function LUA

08/20/2012 20:44 seme2#1
Hello guys, I have a problem with a function ..
does anyone know how does it work?

purge_area ()
08/20/2012 20:51 aljosha123#2
I think the function is not avaible it is a GM-Command i don't think that gives the function...
08/20/2012 20:55 seme2#3
Code:
int __cdecl quest___purge_area(int a1)
{
  long double v1; // fst7@1
  int v2; // ebx@2
  int v3; // ecx@4
  int result; // eax@5
  int v5; // edx@8
  int v6; // esi@8
  int v7; // ebx@10
  int v8; // ebx@13
  int v9; // edi@13
  int v10; // esi@13
  int v11; // eax@13
  int v12; // edx@15
  int v13; // ebx@15
  int v14; // eax@15
  char v15; // al@17
  signed int v16; // eax@18
  signed int v17; // eax@20
  int v18; // [sp+18h] [bp-40h]@10
  __int64 v19; // [sp+1Ch] [bp-3Ch]@1
  signed int v20; // [sp+24h] [bp-34h]@1
  int v21; // [sp+2Ch] [bp-2Ch]@10
  int v22; // [sp+30h] [bp-28h]@15
  int v23; // [sp+48h] [bp-10h]@1

  v23 = *(_DWORD *)_stack_chk_guard__FBSD_1_0;
  LODWORD(v19) = (signed int)lua_tonumber(a1, 1);
  HIDWORD(v19) = (signed int)lua_tonumber(a1, 2);
  v20 = (signed int)lua_tonumber(a1, 3);
  v1 = lua_tonumber(a1, 4);
  if ( !singleton_SECTREE_MANAGER___ms_singleton )
    __assert("instance", "../../common/singleton.h", 26);
  v2 = SECTREE_MANAGER__GetMapIndex(singleton_SECTREE_MANAGER___ms_singleton, v19);
  if ( v2 )
  {
    if ( !singleton_SECTREE_MANAGER___ms_singleton )
      __assert("instance", "../../common/singleton.h", 26);
    v6 = SECTREE_MANAGER__GetMap(singleton_SECTREE_MANAGER___ms_singleton, v2);
    if ( v6 )
    {
      if ( !singleton_quest__CQuestManager___ms_singleton )
        __assert("instance", "../../common/singleton.h", 26);
      v7 = *(_DWORD *)(v6 + 16);
      v18 = v6 + 8;
      v21 = quest__CQuestManager__GetCurrentNPCCharacterPtr(v3, v5, singleton_quest__CQuestManager___ms_singleton);
      while ( v18 != v7 )
      {
        v9 = std___Rb_tree_increment(v7);
        v11 = *(_DWORD *)(v7 + 20);
        v8 = *(_DWORD *)(v11 + 16);
        v10 = v11 + 8;
        while ( v10 != v8 )
        {
          v14 = std___Rb_tree_increment(v8);
          v13 = *(_DWORD *)(v8 + 16);
          v22 = v14;
          if ( CEntity__IsType(v3, v12, v13, 0) )
          {
            if ( v21 != v13 )
            {
              v15 = *(_BYTE *)(v13 + 264);
              if ( !v15 || v15 == 2 )
              {
                v16 = *(_DWORD *)(v13 + 48);
                if ( (_DWORD)v19 <= v16 )
                {
                  if ( v20 >= v16 )
                  {
                    v17 = *(_DWORD *)(v13 + 52);
                    if ( HIDWORD(v19) <= v17 )
                    {
                      if ( (signed int)v1 >= v17 )
                      {
                        if ( !singleton_CHARACTER_MANAGER___ms_singleton )
                          __assert("instance", "../../common/singleton.h", 26);
                        CHARACTER_MANAGER__DestroyCharacter(
                          v3,
                          v12,
                          (int)singleton_CHARACTER_MANAGER___ms_singleton,
                          v13);
                      }
                    }
                  }
                }
              }
            }
          }
          v8 = v22;
        }
        v7 = v9;
      }
    }
  }
  else
  {
    if ( !singleton_quest__CQuestManager___ms_singleton )
      __assert("instance", "../../common/singleton.h", 26);
    quest__CQuestManager__QuestError(
      singleton_quest__CQuestManager___ms_singleton,
      (int)"_purge_area",
      1209,
      "_purge_area: cannot get a map index with (%u, %u)",
      v19);
  }
  result = 0;
  if ( *(_DWORD *)_stack_chk_guard__FBSD_1_0 != v23 )
    __stack_chk_fail(v3, *(_DWORD *)_stack_chk_guard__FBSD_1_0 ^ v23);
  return result;
}
// 804C32C: using guessed type int __cdecl std___Rb_tree_increment(_DWORD);
// 804CD4C: using guessed type int __cdecl std___Rb_tree_increment(_DWORD);
// 804D17C: using guessed type int __fastcall __stack_chk_fail(_DWORD, _DWORD);

//----- (08184D20) --------------------------------------------------------
int __fastcall quest___notice_in_map(int a1, int a2, int a3)
{
  int v3; // esi@2
  int v4; // esi@3
  bool v5; // ebx@3
  int v6; // eax@3
  int result; // eax@4
  int v8; // [sp+28h] [bp-10h]@1

  v8 = *(_DWORD *)_stack_chk_guard__FBSD_1_0;
  if ( !singleton_quest__CQuestManager___ms_singleton )
    __assert("instance", "../../common/singleton.h", 26);
  v3 = *(_DWORD *)(singleton_quest__CQuestManager___ms_singleton + 220);
  if ( v3 )
  {
    v4 = *(_DWORD *)(v3 + 32);
    v5 = lua_toboolean(a3, 2);
    v6 = lua_tostring(a3, 1);
    SendNoticeMap(a1, v5 != 0, v6, v4, v5 != 0);
  }
  result = 0;
  if ( *(_DWORD *)_stack_chk_guard__FBSD_1_0 != v8 )
    __stack_chk_fail(a1, *(_DWORD *)_stack_chk_guard__FBSD_1_0 ^ v8);
  return result;
}
I'm sorry, but it is also a function
08/21/2012 15:29 aljosha123#4
Okay sorry ^^ but i don't know that it functionaly....