Jump to content
  • 0

Fixed stat equip


jasonch

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   1
  • Joined:  12/31/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

bonus bStr,(readparam(bStr) - 999); bonus bStr,50;

Not sure if bStr include STR + Extra STR or only Extra STR.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

use this...statusup2

statusup2 bStr,( ( readparam(bStr) > 50 )? -( readparam(bStr) - 50 ) 50 - readparam(bStr) ) );

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Didn't realize there's command like that :P btw didn't that have to put in OnEquip script? and a OnEquip script is needed imo

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

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 by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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 by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Missed the symbol :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   1
  • Joined:  12/31/11
  • Last Seen:  

Thanks AnnieRuru, it worked!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...