Originally posted by [b]Skotlex[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1039
Uhm
CODE
sc_start4 SC_ARMOR_ELEMENT,300000,Ele_Fire,20,Ele_Water,0; sc_start4 SC_ARMOR_ELEMENT,300000,Ele_Water,20,Ele_Wind,0; sc_start4 SC_ARMOR_ELEMENT,300000,Ele_Earth,20,Ele_Fire,0; sc_start4 SC_ARMOR_ELEMENT,300000,Ele_Wind,20,Ele_Earth,0;
That is the current script for item 14539 (Shadow Armor Scroll). That thing fails since each successive invocation of SC_ARMOR_ELEMENT cancels the previous one. If you want the user to actually acquire shadow-elemental armor, use the actual SC that does that:
CODE
sc_start2 SC_ELEMENTALCHANGE, 300000, 2, Ele_Dark;
Note that since this SC was meant for mob skill usage, it randomizes the elemental level between 1 and 4 when level 1 is used:
CODE
case SC_ELEMENTALCHANGE:
//Val1 is elemental change level, val2 is element to use.
if (!val2) //Val 3 holds the element, when not given, a random one is picked.
val2 = rand()%ELE_MAX;
//Elemental Lv is always a random value between 1 and 4.
if (val1 == 1)
val1 =1+rand()%4;
else if (val1 > 4)
val1 = 4;
break;
Maybe some update is needed, so that if val1 is not given, a random level is used, tht way scripts can use the desired level, and the related mob skills will be updated to pass level 0 (unless that breaks something else?). In any case, I think the item script should be corrected.