Bot Metin2 Dev 4882 Posted January 14, 2018 Bot Share Posted January 14, 2018 With this function, the d.new_jump_all etc are SHIT!!! Open dungeon.h void JoinParty_Coords(LPPARTY pParty, long X, long Y); void Join_Coords(LPCHARACTER ch, long X, long Y); Open dungeon.cpp struct FWarpToDungeonCoords { FWarpToDungeonCoords(long lMapIndex, long X, long Y, LPDUNGEON d) : m_lMapIndex(lMapIndex), m_x(X), m_y(Y), m_pkDungeon(d) { } void operator () (LPCHARACTER ch) { ch->SaveExitLocation(); ch->WarpSet(m_x, m_y, m_lMapIndex); } long m_lMapIndex; long m_x; long m_y; LPDUNGEON m_pkDungeon; }; void CDungeon::Join_Coords(LPCHARACTER ch, long X, long Y) { if (SECTREE_MANAGER::instance().GetMap(m_lMapIndex) == NULL) { sys_err("CDungeon: SECTREE_MAP not found for #%ld", m_lMapIndex); return; } X*=100; Y*=100; FWarpToDungeonCoords(m_lMapIndex, X, Y, this) (ch); } void CDungeon::JoinParty_Coords(LPPARTY pParty, long X, long Y) { pParty->SetDungeon(this); m_map_pkParty.insert(std::make_pair(pParty,0)); if (SECTREE_MANAGER::instance().GetMap(m_lMapIndex) == NULL) { sys_err("CDungeon: SECTREE_MAP not found for #%ld", m_lMapIndex); return; } X*=100; Y*=100; FWarpToDungeonCoords f(m_lMapIndex, X, Y, this); pParty->ForEachOnlineMember(f); } questlua_dungeon.cpp int dungeon_join_coords(lua_State* L) { if (lua_gettop(L)<3 || !lua_isnumber(L,1) || !lua_isnumber(L, 2) || !lua_isnumber(L,3)) { sys_err("not enough argument"); return 0; } long lMapIndex = (long)lua_tonumber(L, 1); LPDUNGEON pDungeon = CDungeonManager::instance().Create(lMapIndex); if (!pDungeon) return 0; LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch->GetParty() && ch->GetParty()->GetLeaderPID() == ch->GetPlayerID()) pDungeon->JoinParty_Coords(ch->GetParty(), (long)lua_tonumber(L, 2), (long)lua_tonumber(L, 3)); else if (!ch->GetParty()) pDungeon->Join_Coords(ch, (long)lua_tonumber(L, 2), (long)lua_tonumber(L, 3)); return 0; } { "join_coords", dungeon_join_coords }, //INTO RegisterDungeonFunctionTable() 1 2 1 Link to comment Share on other sites More sharing options...
TRBizeps 49 Posted January 14, 2018 Share Posted January 14, 2018 Let us wait til someone flames the code 3 Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted November 3, 2019 Active+ Member Share Posted November 3, 2019 I am tested.. Bullshit. Link to comment Share on other sites More sharing options...
Syriza 234 Posted November 3, 2019 Share Posted November 3, 2019 vor 2 Stunden schrieb speze012: I am tested.. Bullshit. You're tested? Link to comment Share on other sites More sharing options...
Active+ Member ScriptMan 1530 Posted November 3, 2019 Active+ Member Share Posted November 3, 2019 3 hours ago, Syriza said: You're tested? Yes, i am not support! Link to comment Share on other sites More sharing options...
Recommended Posts