void CHARACTER::__RandomWalk() { DWORD dwCurTime = get_dword_time(); // Son rastgele yurume zaman©¥ndan 10 saniye gecmediyse, bu sefer yurume yapmay©¥z. if (dwCurTime - m_dwLastRandomWalk < 10000) return; // Son rastgele yurume zaman©¥n©¥ guncelleyin. m_dwLastRandomWalk = dwCurTime; SetRotation(number(0, 359)); // Yonu rastgele olarak ayarlay©¥n float fx, fy; float fDist = number(300, 700); GetDeltaByDegree(GetRotation(), fDist, &fx, &fy); // Hedef konum ve ara noktan©¥n gecilebilir oldu?undan emin olun. if (!(SECTREE_MANAGER::instance().IsMovablePosition(GetMapIndex(), GetX() + (int)fx, GetY() + (int)fy) && SECTREE_MANAGER::instance().IsMovablePosition(GetMapIndex(), GetX() + (int)fx / 2, GetY() + (int)fy / 2))) return; // Rastgele yurume veya ko?ma yapacak ?ekilde ayarlay©¥n. if (number(0, 100) < 60) SetNowWalking(true); else SetNowWalking(false); if (Goto(GetX() + (int)fx, GetY() + (int)fy)) SendMovePacket(FUNC_WAIT, 0, 0, 0, 0); }