Zoom 1 Posted November 19, 2020 Share Posted November 19, 2020 Hello, i have a quest function (topic title). My problem is that, i can't fishing if i next to water, somebody know what's wrong in code? Function: https://pastebin.com/CQz9SkFt Link to comment Share on other sites More sharing options...
Zoom 1 Posted November 22, 2020 Author Share Posted November 22, 2020 #Bump Link to comment Share on other sites More sharing options...
Zoom 1 Posted November 28, 2020 Author Share Posted November 28, 2020 I have a function from Koray that check if player standing next to water. bool CHARACTER::IsNearWater() const { if (!GetSectree()) return false; for (int x = -1; x <= 1; ++x) { for (int y = -1; y <= 1; ++y) { if (IS_SET(GetSectree()->GetAttribute(GetX() + x * 100, GetY() + y * 100), ATTR_WATER)) return true; } } return false; } I need to use this function in quest, so i maked something like this: int pc_near_water(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch) lua_pushboolean(L, ch->IsNearWater()); return 0; } That's all i have but when i try fishing nex to water or anywhere i want, i can't. Anybody can help me? Link to comment Share on other sites More sharing options...
Zoom 1 Posted November 29, 2020 Author Share Posted November 29, 2020 Problem fixed, close. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now