Anatong123 Posted July 26, 2018 Share 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 Link to comment Share on other sites More sharing options...
0 crazyarashi Posted July 27, 2018 Share 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 Link to comment Share on other sites More sharing options...
0 Capuche Posted July 29, 2018 Share 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 Link to comment Share on other sites More sharing options...
0 Alzhea Posted August 4, 2019 Share Posted August 4, 2019 i tried your code sir capuche but it's not working in item script Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites