Anatong123 Posted July 26, 2018 Posted July 26, 2018 How can I read the parameter total stat eg. total luk ( base luk + bonus luk from item) I tried readparam(tLuk) but it doesnt work Quote
0 crazyarashi Posted July 27, 2018 Posted July 27, 2018 I think there is nothing like that for now.. since readparam is reading only the base stats of the character Quote
0 Capuche Posted July 29, 2018 Posted July 29, 2018 No script command to retrieve the total parameter value like crazyarashi said, but you can create one /*========================================== * Returns a character's specified total stat. * readparam2 <param>; *------------------------------------------*/ BUILDIN_FUNC(readparam2) { TBL_PC *sd = NULL; int value = 0, param_type = script_getnum(st, 2); if (!script_rid2sd(sd)) { script_pushint(st, -1); return SCRIPT_CMD_FAILURE; } switch( param_type ) { case 0: value = sd->base_status.str; break; case 1: value = sd->base_status.agi; break; case 2: value = sd->base_status.vit; break; case 3: value = sd->base_status.int_; break; case 4: value = sd->base_status.dex; break; case 5: value = sd->base_status.luk; break; default: script_pushint(st, -1); return SCRIPT_CMD_FAILURE; } script_pushint(st,value); return SCRIPT_CMD_SUCCESS; } BUILDIN_DEF(readparam2,"i"), 0 to 5 as parameter to retrieve str agi vit int dex luk 1 Quote
0 Alzhea Posted August 4, 2019 Posted August 4, 2019 i tried your code sir capuche but it's not working in item script Quote
0 hadji22 Posted March 4, 2023 Posted March 4, 2023 Hello, I got the same question. Is there a solution to this question? Quote
Question
Anatong123
How can I read the parameter total stat eg. total luk ( base luk + bonus luk from item) I tried readparam(tLuk) but it doesnt work
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.