bearnope246 Posted October 10, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Share Posted October 10, 2016 (edited) - script guildbonus -1,{ OnPCStatCalcEvent: bonus bStr, 30; } Simple, worked only when change map and change equip and other... But when login in the stat isnt change.... ?? Update: Ok i find out that status_calc_pc is executed first, and then >>>> npc event... I need a way to run npc_script_event(sd, NPCE_STATCALC); first... Or have to status_calc_pc vy script in game... right? Edited October 10, 2016 by bearnope246 Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 (edited) I don't think you got how it works bro. Take a look at the description: OnPCStatCalcEvent: This special label triggers when a player's stats are recalculated, such as whenchanging stats, equipment, or maps, as well as when logging in, leveling up, andmounting a job mount. This can be used to grant additional item bonuses to certainplayer groups, for instance. This means that this event will only be triggered OnLogin if your stats are recalculated. If your stats are never recalculated then this event will never be triggered.Well, if you need something to happen only on player's login then you should use OnPCLoginEvent instead of OnPCStatCalcEvent.Att,_Okuz_. Edited October 11, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 11, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 11, 2016 I don't think you got how it works bro. Take a look at the description: OnPCStatCalcEvent: This special label triggers when a player's stats are recalculated, such as when changing stats, equipment, or maps, as well as when logging in, leveling up, and mounting a job mount. This can be used to grant additional item bonuses to certain player groups, for instance. This means that this event will only be triggered OnLogin if your stats are recalculated. If your stats are never recalculated then this event will never be triggered. Well, if you need something to happen only on player's login then you should use OnPCLoginEvent instead of OnPCStatCalcEvent. Att, _Okuz_. if you use OnPCStatCalcEvent with a stat bonus like: OnPCStatCalcEvent: bonus bstr,10; This will run just like Onpcloginevent... but only after the stat is calculated first (Base stat, equipment, charm........) So if you logging in, the stat won't change to str + 10.... only if you change map or equip/unequip something then it will... i put in a dospbottom script to test.... i saw the it popup after a few sec, so i say that it run after status_calc_pc. So what i need is The bonus applied right away when i login.... Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 (edited) If you need the bonus to be applied on login then you should use OnPCLoginEvent...OnPCStatCalcEvent will be triggered only after the status_calc_pc(...), as you already noticed. I don't know why you want to use OnPCStatCalcEvent to give player bonus On Login...Try something like this: - script whatever -1,{ OnPCLoginEvent: // will force to give the bonus on login event OnPCStatCalcEvent: // will give the bonus when stats are recalculated if (@received) // don't acum the bonuses... end; bonus bStr, 30; set @received, 1; } Att, _Okuz_. Edited October 11, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 11, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 11, 2016 If you need the bonus to be applied on login then you should use OnPCLoginEvent... OnPCStatCalcEvent will be triggered only after the status_calc_pc(...), as you already noticed. I don't know why you want to use OnPCStatCalcEvent to give player bonus On Login... Try something like this: - script whatever -1,{ OnPCLoginEvent: // will force to give the bonus on login event OnPCStatCalcEvent: // will give the bonus when stats are recalculated if (@received) // don't acum the bonuses... end; bonus bStr, 30; set @received, 1; } Att, _Okuz_. I already tried that.. Nothing will change. Onpcloginevent and OnPCStatCalcEvent are the same.. they always run after status_calc_pc. I want it to calculated just like Item bonus... Right when they login.. So the stats bobus apply . Im using this to make a Guild bonus script. Anyone with the guildid will have bonus. It work but i must change map or equip something for the stat to appear..... I saw someone change the npc_script_event to runscript() and they said it worked... I tried that too but error say not enough argument.... Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 Can you link the post? Maybe you're missing an argument that is required. Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 11, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 11, 2016 Here it is :https://rathena.org/board/topic/53490-about-update-characters-status/ Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 11, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 11, 2016 (edited) Maybe now... - script whatever -1,{ OnPCLoginEvent: statusup2 bStr,readparam(bStr); end; OnPCStatCalcEvent: if (@received) end; bonus bStr, 30; set @received, 1; } Try it!Att,_Okuz_. Edited October 11, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 11, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 11, 2016 Maybe now... - script whatever -1,{ OnPCLoginEvent: statusup2 bStr,readparam(bStr); end; OnPCStatCalcEvent: if (@received) end; bonus bStr, 30; set @received, 1; } Try it! Att, _Okuz_. Tried it. Every time i Relog Str got doubled... 1 2 4 816.... I think this kind of thing really need a source mod.... Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 12, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 12, 2016 something like this ? - script Sample -1,{ OnPCLoginEvent: recalculatestat; end; OnPCStatCalcEvent: bonus bStr, 30; end; } Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 12, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 12, 2016 AlreadyI tried that too emistry.... Stat still not updated on login... Quote Link to comment Share on other sites More sharing options...
0 _Okuz_ Posted October 13, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 92 Reputation: 17 Joined: 08/11/12 Last Seen: August 30, 2017 Share Posted October 13, 2016 (edited) Well, first of all I don't think bonus are meant to be used outside the item scripts... As its description says, they are unsafe because there aren't any guarantee of when the bonus expire... *bonus <bonus type>,<val1>;*bonus2 <bonus type>,<val1>,<val2>;*bonus3 <bonus type>,<val1>,<val2>,<val3>;*bonus4 <bonus type>,<val1>,<val2>,<val3>,<val4>;*bonus5 <bonus type>,<val1>,<val2>,<val3>,<val4>,<val5>;These commands are meant to be used in item scripts. They will probably workoutside item scripts, but the bonus will not persist for long. They, asexpected, refer only to an invoking character.You can find the full list of possible bonuses and which command to use for eachkind in 'doc/item_bonus.txt'. I'm gonna try to solve this tonight and if I have success I'll let you know.Att,_Okuz_. Edited October 13, 2016 by _Okuz_ Quote Link to comment Share on other sites More sharing options...
0 bearnope246 Posted October 19, 2016 Group: Members Topic Count: 41 Topics Per Day: 0.01 Content Count: 94 Reputation: 5 Joined: 06/30/16 Last Seen: July 6, 2018 Author Share Posted October 19, 2016 Any idea? Bump Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 21, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 21, 2016 i dont see why it doesn't work for you ... If you are having issue, at least provide some useful information/feedback... the word "BUMP" are not helping at all... and stop bump without provide any useful info. Quote Link to comment Share on other sites More sharing options...
Question
bearnope246
Simple, worked only when change map and change equip and other...
But when login in the stat isnt change....
??
Update: Ok i find out that status_calc_pc is executed first, and then >>>> npc event...
I need a way to run npc_script_event(sd, NPCE_STATCALC); first... Or have to status_calc_pc vy script in game... right?
Edited by bearnope246Link to comment
Share on other sites
13 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.