Jump to content
  • 0

Item Option Script


xG000000

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/07/20
  • Last Seen:  

is there a script for scrolls that will enchant all gears including shadow gears like, I want to have a scroll that will give 1% - 10% random Max HP Percent to an item and i can choose which slot will i put it like Slot 1 to Slot 5. 

i dont know how to use setrandomoption as a script please help me thanks.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

setarray .@indices[1], EQI_ACC_L,EQI_ACC_R,EQI_SHOES,EQI_GARMENT,EQI_HEAD_LOW,EQI_HEAD_MID,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R,EQI_COSTUME_HEAD_TOP,EQI_COSTUME_HEAD_MID,EQI_COSTUME_HEAD_LOW,EQI_COSTUME_GARMENT,EQI_SHADOW_ARMOR,EQI_SHADOW_WEAPON,EQI_SHADOW_SHIELD,EQI_SHADOW_SHOES,EQI_SHADOW_ACC_R,EQI_SHADOW_ACC_L;
for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
	if(getequipisequiped(.@indices[.@i])) {
		.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
		.@equipped = 1;
	}
	.@menu$ = .@menu$ + ":";
}
.@part = .@indices[select(.@menu$)];
setrandomoption(.@part,0,rand(1,220),rand(1,2),0);
setrandomoption(.@part,1,rand(1,220),rand(1,2),0);
setrandomoption(.@part,2,rand(1,220),rand(1,2),0);
setrandomoption(.@part,3,rand(1,220),rand(1,2),0);
setrandomoption(.@part,4,rand(1,220),rand(1,2),0);

 

Edited by Start_
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

Read at \rathena\doc\script_commands.txt

Lines 10267

You can simply test with simple npc to see result.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/07/20
  • Last Seen:  

but i cant make it choose which slot im going to put the item option. i want it like a scroll that will give 1~10% MaxHP (or other options) to all gears including shadow gears.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

There are index (Slots) to choose. 0 mean slot 1 and so on

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/07/20
  • Last Seen:  

can you show a simple example of the script for my reference.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  16
  • Reputation:   0
  • Joined:  10/07/20
  • Last Seen:  

13 hours ago, Start_ said:

setarray .@indices[1], EQI_ACC_L,EQI_ACC_R,EQI_SHOES,EQI_GARMENT,EQI_HEAD_LOW,EQI_HEAD_MID,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R,EQI_COSTUME_HEAD_TOP,EQI_COSTUME_HEAD_MID,EQI_COSTUME_HEAD_LOW,EQI_COSTUME_GARMENT,EQI_SHADOW_ARMOR,EQI_SHADOW_WEAPON,EQI_SHADOW_SHIELD,EQI_SHADOW_SHOES,EQI_SHADOW_ACC_R,EQI_SHADOW_ACC_L;
for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
	if(getequipisequiped(.@indices[.@i])) {
		.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
		.@equipped = 1;
	}
	.@menu$ = .@menu$ + ":";
}
.@part = .@indices[select(.@menu$)];
setrandomoption(.@part,0,rand(1,220),rand(1,2),0);
setrandomoption(.@part,1,rand(1,220),rand(1,2),0);
setrandomoption(.@part,2,rand(1,220),rand(1,2),0);
setrandomoption(.@part,3,rand(1,220),rand(1,2),0);
setrandomoption(.@part,4,rand(1,220),rand(1,2),0);

 

thanks bro ?

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