Jump to content

new horse function Horse.Kill


Recommended Posts

  • Premium

#### 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 by EnKor
if pc.get_sex() == true and npc.get_sex() == false then
	npc.purge()
end

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 2

      Feeding game source to LLM

    2. 0

      Target Information System

    3. 2

      Feeding game source to LLM

    4. 2

      anti exp explanation pls

    5. 2

      Feeding game source to LLM

    6. 2

      anti exp explanation pls

    7. 0

      [GR2] Positioning an object added with "Attach"

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.