Braunwald Posted August 13, 2022 at 07:52 AM Share Posted August 13, 2022 at 07:52 AM (edited) Precisei de fazer alguns testes com o Cavalo morto, e verifiquei que não havia forma (rápida) de o matar. Aqui fica a função! Acabei de a criar e já estive a testar, não me parece haver qualquer erro! #### Server/game/src/horse_rider.cpp Spoiler // Search: void CHorseRider::FeedHorse() { [...] } // Add after: void CHorseRider::KillHorse() { if (GetHorseLevel() > 0 && GetHorseHealth() >= 0) { UpdateHorseHealth( -GetHorseHealth()); ResetHorseHealthDropTime(); } } #### Server/game/src/horse_rider.h Spoiler // Search: void FeedHorse(); // Add after: void KillHorse(); #### Server/game/src/questlua_horse.cpp Spoiler // Search: int horse_feed(lua_State* L) { [...] } // Add after: int kill_horse(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->KillHorse(); return 0; } // Search: { "feed", horse_feed }, // Add after: { "kill", kill_horse }, quest_functions Spoiler horse.kill quest: Spoiler when 40003.use with pc.is_gm() begin local s = select("Kill Horse", "Revive Horse", "Exit") if s == 1 then if horse.is_dead() then syschat("Horse is dead") return end horse.kill() horse.summon() elseif s == 2 then if horse.is_dead() == false then return end horse.revive() end end Edited August 13, 2022 at 07:56 AM by Braunwald 1 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now