hadji22 Posted March 3, 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 3, 2023 Hey there, rAthena pips. Is it feasible to create quest requirements that are based on character stats? For instance, in order to finish this mission/quest, you must achieve at least 300str. Is it possible? Quote Link to comment Share on other sites More sharing options...
1 Virtue Posted March 3, 2023 Group: Members Topic Count: 92 Topics Per Day: 0.02 Content Count: 354 Reputation: 22 Joined: 11/17/11 Last Seen: May 12, 2024 Share Posted March 3, 2023 Definitely. You can use the one below: *readparam(<parameter number>{,"<character name>"}) *readparam(<parameter number>{,<char_id>}) This function will return the specified stat of the invoking character, or, if a character name or character id is specified, of that player. The stat can either be a number or parameter name, defined in 'src/map/script_constants.hpp'. Some example parameters: StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight, JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp, BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk, Ap, MaxAp All of these also behave as variables, but don't expect to be able to just 'set' them - some will not work for various internal reasons. Example 1: // Returns how many status points you haven't spent yet. mes "Unused status points: " + readparam(9); Using this particular information as a function call is not required. Typing this will return the same result: mes "Unused status points: " + StatusPoint; Example 2: You can also use this command to get stat values. if (readparam(bVit) > 77) mes "Only people with over 77 Vit are reading this!"; https://github.com/rathena/rathena/blob/b56f11207c3cb5337dca07bb910ba85316c84939/doc/script_commands.txt#L2445 Quote Link to comment Share on other sites More sharing options...
0 hadji22 Posted March 3, 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 Author Share Posted March 3, 2023 5 minutes ago, Virtue said: Definitely. You can use the one below: *readparam(<parameter number>{,"<character name>"}) *readparam(<parameter number>{,<char_id>}) This function will return the specified stat of the invoking character, or, if a character name or character id is specified, of that player. The stat can either be a number or parameter name, defined in 'src/map/script_constants.hpp'. Some example parameters: StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight, JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp, BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk, Ap, MaxAp All of these also behave as variables, but don't expect to be able to just 'set' them - some will not work for various internal reasons. Example 1: // Returns how many status points you haven't spent yet. mes "Unused status points: " + readparam(9); Using this particular information as a function call is not required. Typing this will return the same result: mes "Unused status points: " + StatusPoint; Example 2: You can also use this command to get stat values. if (readparam(bVit) > 77) mes "Only people with over 77 Vit are reading this!"; https://github.com/rathena/rathena/blob/b56f11207c3cb5337dca07bb910ba85316c84939/doc/script_commands.txt#L2445 Thank you @Virtue, big help man. Quote Link to comment Share on other sites More sharing options...
Question
hadji22
Hey there, rAthena pips.
Is it feasible to create quest requirements that are based on character stats?
For instance, in order to finish this mission/quest, you must achieve at least 300str.
Is it possible?
Link to comment
Share on other sites
2 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.