Jump to content
  • 0

addting stats


markiez22

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  126
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

can u give me a script that. .

Menu:

Addstr +5

AddAgi +5

AddInt +5

AddVit +5

AddDex +5

AddLuk +5

like thats?

can u help me about that???

Edited by AnnieRuru
split topic from http://rathena.org/board/topic/57387-add-stats-and-add-skill-npc/
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


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

OnPCStatCalcEvent_17007.patch

/*
bStr	13
bAgi	14
bVit	15
bInt	16
bDex	17
bLuk	18
*/
prontera,154,181,5	script	kjfhsdkfjh	100,{
//	enable_items;
stat_recalc();
bonus_stat = 0;
mes "which bonus do you want ?";
next;
.@s = select ( "str +5", "agi +5", "vit +5", "int +5", "dex +5", "luk +5" ) -1;
if ( bonus_stat & 1 << .@s ) {
	mes "you already gain this bonus";
	close;
}
bonus_stat = bonus_stat | 1 << .@s;
stat_recalc();
close;
OnPCStatCalcEvent:
//	for ( .@i = 0; .@i < 6; .@i++ )
//		if ( bonus_stat & 1 << .@i )
//			bonus .@i + 13, 5;
bonus bstr, 5;
dispbottom "test run";
end;
}

prontera,154,183,5	script	kjdfhksdjf	100,{
stat_recalc();
}

again this script is not working ... /spit

previously OnPCStatCalcEvent can works on change maps and permanent bonus

but if use a script command to reforce status recalculation ... stat_recalc() script command isn't working ... can't figure out why

maybe just use *nude ...

prontera,154,181,5    script    kjfhsdkfjh    100,{
   mes "which bonus do you want ?";
   next;
   .@s = select ( "str +5", "agi +5", "vit +5", "int +5", "dex +5", "luk +5" ) -1;
   if ( bonus_stat & 1 << .@s ) {
       mes "you already gain this bonus";
       close;
   }
   bonus_stat = bonus_stat | 1 << .@s;
   nude;
   close;
OnPCStatCalcEvent:
   for ( .@i = 0; .@i < 6; .@i++ )
       if ( bonus_stat & 1 << .@i )
           bonus .@i + 13, 5;
   end;
}

and force user to put on their equipments to recalculate the bonus ...

EDIT: for those who new to this OnPCStatCalcEvent:

2nd script works, but 1st script here doesn't work

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...