Anatong123 Posted July 26, 2018 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 22 Reputation: 0 Joined: 07/13/18 Last Seen: October 16, 2019 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 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 10 hours ago 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 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 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 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 06/16/13 Last Seen: Friday at 07:48 PM 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...
0 hadji22 Posted March 4, 2023 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 35 Reputation: 1 Joined: 12/28/14 Last Seen: June 8, 2023 Share Posted March 4, 2023 Hello, I got the same question. Is there a solution to this question? Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.