Jump to content
  • 0

Align bonus


avertuss

Question

4 answers to this question

Recommended Posts

  • 0

affect.h:

// 1) Search: 

AFFECT_CUBE_12,
 

// 2) After make a new line and paste:

ALIGNMENT_BONUS_1,
ALIGNMENT_BONUS_2,
 

Code for use:

	#ifdef __ALIGNMENT_BONUS__ 
	    if (GetRealAlignment() == NAME_ALIGNMENT_1)
	    {
	        AddAffect(ALIGNMENT_BONUS_1, POINT_MAX_HP, VALUE_BONUS_ALIGNMENT_1, 0, ALIGNMENT_TIME, 0, true);
	    }
	    if (GetRealAlignment() == NAME_ALIGNMENT_2)
	    {
	        AddAffect(ALIGNMENT_BONUS_2, POINT_MAX_HP, VALUE_BONUS_ALIGNMENT_2, 0, ALIGNMENT_TIME, 0, true);
	    }
	#endif
 service.h:
	#define	__ALIGNMENT_BONUS__ 

	#define	NAME_ALIGNMENT_1	100000
	#define	NAME_ALIGNMENT_2	200000

	#define ALIGNMENT_TIME (60*60*24*365)

	#define	VALUE_BONUS_ALIGNMENT_1	1000
	#define	VALUE_BONUS_ALIGNMENT_2	2000

 

You can add code execution in input_login.cpp -> EnterGame

  • Love 1
Link to comment
Share on other sites

  • 0
1 hour ago, avertuss said:

@VegaS

 

It's work but it add bonus after relog and if i change align points to 0 this bonus don't remove. 

 

if (FindAffect(ALIGNMENT_BONUS_1))
	{
		if (GetRealAlignment() != NAME_ALIGNMENT_1)  
		{	
			RemoveAffect(ALIGNMENT_BONUS_1);
			//return false;
		}	
	}
I apologize for this ugly code, but I'm very tired.

I haven't tested this, but I can help you more on skype, because we did not stay very long forum.

Link to comment
Share on other sites

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


  • Activity

    1. 3

      Once upon a time...

    2. 1183

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    3. 3

      Once upon a time...

    4. 3

      Once upon a time...

    5. 0

      problem ability

    6. 0

      Transmutation system error "unknow command server"

    7. 39

      Official Transmutation / Change Look

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