Jump to content
  • 0

Problem with pc.mount_bonus


xXCapConXx

Question

Hello,

 

i want to add more then one attribute on my mount, but the "pc.mount_bonus" does only allow ONE bonus.

I saw a dif for the 2089 game to fix this, but i want to change it in the source, but i don't find something like this.

 

I hope someone can help me.

 

Kind Regards

xXCapConXx

Link to comment

7 answers to this question

Recommended Posts

  • 0
  • VIP
        when 71114.use begin
             pc.mount(20110, 600)
             pc.mount_bonus(apply.DEF_GRADE_BONUS,75,600)
        end
If code.isTurkisch:
    self.suicide();
elif code.isPoland:
   self.giveHate()

 

Link to comment
  • 0

Open questlua_pc.cpp and search pc_mount_bonus function and replace with this

	int pc_mount_bonus(lua_State* L)
	{
		BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1));
		long value = static_cast<long>(lua_tonumber(L, 2));
		long duration = static_cast<long>(lua_tonumber(L, 3));

		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		if( NULL != ch )
		{
			//ch->RemoveAffect(AFFECT_MOUNT_BONUS);
			ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false);
		}

		return 0;
	}

Best Regards

Ellie

  • Love 4

Do not be sorry, be better.

Link to comment
  • 0

Open questlua_pc.cpp and search pc_mount_bonus function and replace with this

	int pc_mount_bonus(lua_State* L)
	{
		BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1));
		long value = static_cast<long>(lua_tonumber(L, 2));
		long duration = static_cast<long>(lua_tonumber(L, 3));

		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		if( NULL != ch )
		{
			//ch->RemoveAffect(AFFECT_MOUNT_BONUS);
			ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false);
		}

		return 0;
	}

Best Regards

Ellie

 

So easy?! ... Facepalm for my self ... :P  Thanks!

Link to comment
  • 0

 

Open questlua_pc.cpp and search pc_mount_bonus function and replace with this

	int pc_mount_bonus(lua_State* L)
	{
		BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1));
		long value = static_cast<long>(lua_tonumber(L, 2));
		long duration = static_cast<long>(lua_tonumber(L, 3));

		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		if( NULL != ch )
		{
			//ch->RemoveAffect(AFFECT_MOUNT_BONUS);
			ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false);
		}

		return 0;
	}

Best Regards

Ellie

 

So easy?! ... Facepalm for my self ... :P  Thanks!

 

 

Some problem looking hard but normally it was easy :)

 

Best Regards

Ellie

Do not be sorry, be better.

Link to comment
  • 0

 

 

Open questlua_pc.cpp and search pc_mount_bonus function and replace with this

	int pc_mount_bonus(lua_State* L)
	{
		BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1));
		long value = static_cast<long>(lua_tonumber(L, 2));
		long duration = static_cast<long>(lua_tonumber(L, 3));

		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		if( NULL != ch )
		{
			//ch->RemoveAffect(AFFECT_MOUNT_BONUS);
			ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false);
		}

		return 0;
	}

Best Regards

Ellie

 

So easy?! ... Facepalm for my self ... :P  Thanks!

 

 

Some problem looking hard but normally it was easy :)

 

Best Regards

Ellie

 

 

Yeah, ok i tested it, and it work's ! thanks. :D

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.