jasonch Posted October 10, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 29 Reputation: 1 Joined: 12/31/11 Last Seen: June 6, 2023 Share Posted October 10, 2012 Hello! I would like to request a database script for an equip that would give a fixed stat. Example: an item that fixes str at 50. So if how much the str of a character it would increase/decrease to 50. Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 10, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 10, 2012 bonus bStr,(readparam(bStr) - 999); bonus bStr,50; Not sure if bStr include STR + Extra STR or only Extra STR. Quote Link to comment Share on other sites More sharing options...
Emistry Posted October 10, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 10, 2012 use this...statusup2 statusup2 bStr,( ( readparam(bStr) > 50 )? -( readparam(bStr) - 50 ) 50 - readparam(bStr) ) ); Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 10, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 10, 2012 Didn't realize there's command like that btw didn't that have to put in OnEquip script? and a OnEquip script is needed imo Quote Link to comment Share on other sites More sharing options...
GmOcean Posted October 11, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted October 11, 2012 I don't think you should put this in the OnEquip section, since the OnEquip section is like a, Run 1 time, then stop area. Meaning, if it's on the OnEquip section and you equip it, your str will go to 50, but if you equip other items after that, it'd increase it as well. (Atleast I'm pretty sure that's what will happen). However if you just put it in the normal script section, it'll do a sort of, (loop refresh) constantly making sure your str does what it's supposed to. Meaning any gear equipped later on, shouldn't affect it. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted October 11, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted October 11, 2012 @Emistry wtf ... the topic asked for temporary stat change into 50 str regardless of their base str high or low the hell you modify the player's stat permanently ? @darristan I remember I put up a database FAQ about OnEquip something on post#2 http://www.eathena.ws/board/index.php?s=&showtopic=168545&view=findpost&p=1007915 something like this should work bonus bstr, ~readparam(bstr) + 51; however note that other items that give str bonus cannot be track currently need a custom script command http://www.eathena.ws/board/index.php?showtopic=271354 Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 11, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 11, 2012 (edited) Oops post typo, I mean use OnEquip and OnUnEquip. If bStr, readparam(bStr)+51 will increase current str by 51 (Example 99+51) but what TS wan is fix at 50... That is why I say emistry script should put OnEquip and save str to variable then return when OnUnequip... Edited October 11, 2012 by darristan Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted October 11, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted October 11, 2012 (edited) even by use OnEquip and OnUnEquip with *statusup2 script command still need to save a temporal player variable to keep track of original base str of the player has ... isn't it ? without saving a temporal player variable, player might exploit this system by not spending on str stats, get this item equipped, gaining free str stats EDIT: oh your edit, you meant { statusup2 .... }, { set @temp, readparam(bstr); },{ statusup2 ... str value back into @temp } read carefullly, it is ~readparam(bStr) +51 there is a -> ~ <- symbol to invert numbers between positive and negative prontera,157,175,5 script ksdjfhdksf 100,{ input .@a, -2000000000, 2000000000; dispbottom ( ~.@a + .@a )+""; // always shows -1 dispbottom ( ~.@a + 1 )+""; // turns positive into negative numbers, or the opposite dispbottom ( ~.@a + .@a + 50 + 1 )+""; // always show 50 } ~ is a number inverter when add up by itself, always return -1 since the topic wants 50, I did ( 50 + 1 ), which is 51 Edited October 11, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 11, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 11, 2012 Missed the symbol Quote Link to comment Share on other sites More sharing options...
jasonch Posted October 11, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 29 Reputation: 1 Joined: 12/31/11 Last Seen: June 6, 2023 Author Share Posted October 11, 2012 Thanks AnnieRuru, it worked! Quote Link to comment Share on other sites More sharing options...
Question
jasonch
Hello! I would like to request a database script for an equip that would give a fixed stat.
Example: an item that fixes str at 50. So if how much the str of a character it would increase/decrease to 50.
Link to comment
Share on other sites
9 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.