Is it possible to make *bonus script work on OnPCLoginEvent and OnPCLogoutEvent? Basically what I want is it gives bonus stat upon login based on character variable set.
---------------------------------------
*bonus <bonustype>,<val1>;
*bonus2 <bonustype>,<val1>,<val2>;
*bonus3 <bonustype>,<val1>,<val2>,<val3>;
*bonus4 <bonustype>,<val1>,<val2>,<val3>,<val4>;
*bonus5 <bonustype>,<val1>,<val2>,<val3>,<val4>,<val5>;
These commands are meant to be used in item scripts. They will probably work
outside item scripts, but the bonus will not persist for long. They, as
expected, refer only to an invoking character.
You can find the full list of possible bonuses and which command to use for each
kind in 'doc/item_bonus.txt'.
---------------------------------------
I have tried using *statusup2, it works but it falls under the base status of the character which I would want it to be on the + side of the stats. and If I change it to Bonus instead of statusup2, nothing happens.
---------------------------------------
*statusup2 <stat>,<amount>{,<char_id>};
This command will change a specified stat of the invoking character by the
specified amount permanently. The amount can be negative. See 'statusup'.
// This will decrease a character's Vit forever.
statusup2 bVit,-1;
---------------------------------------
Further research, there are couple of scripts I found however requires OnPCStatCalcEvent which I think is removed already around 2020 githash. -->
Sample script that uses bonus script command from @Emistry on link below
Question
Gouki
Hi guys,
Is it possible to make *bonus script work on OnPCLoginEvent and OnPCLogoutEvent? Basically what I want is it gives bonus stat upon login based on character variable set.
I have tried using *statusup2, it works but it falls under the base status of the character which I would want it to be on the + side of the stats. and If I change it to Bonus instead of statusup2, nothing happens.
Code runs something like --
- script abcdefg -1,{ OnPCLoginEvent: if (#vit_up == 1) statusup2 bVit,30; end; OnPCLogoutEvent: if (#vit_up == 1) statusup2 bVit,-30; end; }
Further research, there are couple of scripts I found however requires OnPCStatCalcEvent which I think is removed already around 2020 githash. -->
Sample script that uses bonus script command from @Emistry on link below
Removed on June 6, 2020 -> https://github.com/rathena/rathena/issues/2450#issuecomment-639630185
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.