Jump to content
Daxter

Level up rewards

Recommended Posts

Hi,

 

How can level-up rewards be added? And could they be account-bound without requiring outside tracking (such as GameDB or .txt)

Share this post


Link to post
Share on other sites

@Daxter Hi. If you have source code - you can reward level-up.

Example function:

image.png.7638ae275af1a144197e74db67347e6a.png

And no need GameDB/.txt

 

For add function - open FightAble.cpp and find function:

void CFightAble::CountLevel()

After string:

g_CParser.DoString("Shengji_Shuxingchengzhang", enumSCRIPT_RETURN_NONE, 0, enumSCRIPT_PARAM_LIGHTUSERDATA, 1, this->IsCharacter(), DOSTRING_PARAM_END);

Paste this code:

g_CParser.DoString("Handler_LvUp", enumSCRIPT_RETURN_NONE, 0, enumSCRIPT_PARAM_LIGHTUSERDATA, 1, this->IsCharacter(), enumSCRIPT_PARAM_NUMBER, 1, lCurLevel, DOSTRING_PARAM_END);

 

Edited by Graf
  • Thanks 1

Share this post


Link to post
Share on other sites
1 час назад, Daxter сказал:

Hi, and thanks for the help.

 

However, I am not running source code - is it not possible via Lua?

Whithout .txt ... I think no.

Share this post


Link to post
Share on other sites

you already have everything in lua no need .txt

function Shengji_Shuxingchengzhang( role )
  
 end

this function on level up which also call 
 

BsAttrUpgrade( role ) 

and rest functions to add attrs  and recheckattr on level up 

 

inside same function u will see how it add credit on level up if player has master as 
 

AddMasterCredit(role, 500)	

so inside this function create your own custom lua to give what ever u want 

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...