Radian 9 Posted January 31, 2015 Can someone tell me how to restore the old pallets on an item.. because I am using equipped and unequipped on an item. {},{ changelook 7,201 } { restore original pallet } Quote Share this post Link to post Share on other sites
0 Ragno 57 Posted January 31, 2015 (edited) You need to save in a new variable the previous look value before change it, then when unequip the armor make the changelook with the value saved of the var. Something like these: OnEquipScript: <" previouspal = getlook(7); changelook 7,201; "> OnUnequipScript: <" changelook 7,previouspal; "> Edited February 1, 2015 by Ragno 1 Reins reacted to this Quote Share this post Link to post Share on other sites
0 Radian 9 Posted February 1, 2015 Thank you so much! Quote Share this post Link to post Share on other sites
0 Ragno 57 Posted February 1, 2015 Just for the record, I missed a quotation mark at the end of the OnUnequipScript in the example. I'm happy it help you, good look in that, the use you give to the item sounds interesting. Quote Share this post Link to post Share on other sites
0 Reins 3 Posted February 1, 2015 You need to save in a new variable the previous look value before change it, then when unequip the armor make the changelook with the value saved of the var. Something like these: OnEquipScript: <" previouspal = getlook(7); changelook 7,201; "> OnUnequipScript: <" changelook 7,previouspal; "> thanks for this! how will i make this into item consumable script with time duration example i have certain cloth and hair color and i consume apple#512 which turns the cloth and hair color into red or specific palettes and after 1 minute it will return to the designated palettes thanks! sorry for my bad english Quote Share this post Link to post Share on other sites
0 Ragno 57 Posted February 2, 2015 You need to save in a new variable the previous look value before change it, then when unequip the armor make the changelook with the value saved of the var. Something like these: OnEquipScript: <" previouspal = getlook(7); changelook 7,201; "> OnUnequipScript: <" changelook 7,previouspal; "> thanks for this! how will i make this into item consumable script with time duration example i have certain cloth and hair color and i consume apple#512 which turns the cloth and hair color into red or specific palettes and after 1 minute it will return to the designated palettes thanks! sorry for my bad english You can try calling a function to do that. Maybe trying with the next example you can get it: In Item script: callfunc "ChangeStyle",201,getlook(7); Where "201" is the new changelook value and "getlook(7)" is the previous changelook value. In a NPC Script: function script ChangeStyle { changelook 7,getarg(0); dispbottom "Your look has changed to "+getarg(0); dispbottom "With a duration of a second, then your look will return to normal"; sleep2 1000; changelook 7,getarg(1); dispbottom "Your look has returned to normal"; end;} It works for me, but it need to be tested a little more. I hope this help you. Quote Share this post Link to post Share on other sites
0 Reins 3 Posted February 3, 2015 (edited) You need to save in a new variable the previous look value before change it, then when unequip the armor make the changelook with the value saved of the var. Something like these: OnEquipScript: <" previouspal = getlook(7); changelook 7,201; "> OnUnequipScript: <" changelook 7,previouspal; "> thanks for this! how will i make this into item consumable script with time duration example i have certain cloth and hair color and i consume apple#512 which turns the cloth and hair color into red or specific palettes and after 1 minute it will return to the designated palettes thanks! sorry for my bad english You can try calling a function to do that. Maybe trying with the next example you can get it: In Item script: callfunc "ChangeStyle",201,getlook(7); Where "201" is the new changelook value and "getlook(7)" is the previous changelook value. In a NPC Script: function script ChangeStyle { changelook 7,getarg(0); dispbottom "Your look has changed to "+getarg(0); dispbottom "With a duration of a second, then your look will return to normal"; sleep2 1000; changelook 7,getarg(1); dispbottom "Your look has returned to normal"; end;} It works for me, but it need to be tested a little more. I hope this help you. Okay Let me try first thanks! btw will this change only cloth color? or both hair and cloth? and how about different hair and cloth color like (color #25 for hair and color#30 for cloth) Edited February 3, 2015 by Reins Quote Share this post Link to post Share on other sites
0 Ragno 57 Posted February 3, 2015 Okay Let me try first thanks! btw will this change only cloth color? or both hair and cloth? and how about different hair and cloth color like (color #25 for hair and color#30 for cloth)It will change only the cloth color, but you can edit it to make it work as you may need: change cloth or hair color only, change both cloth and hair with the same color, or change both cloth and hair with different colors. To change hair color use "changelook 6" instead of "changelook 7". Please see the hercules documentation for script commands to see how does that scripts works (just search for *changelook in your browser). 1 Reins reacted to this Quote Share this post Link to post Share on other sites
0 Reins 3 Posted February 4, 2015 okay let me try those thanks again ! Quote Share this post Link to post Share on other sites
0 Reins 3 Posted February 4, 2015 (edited) Okay Let me try first thanks! btw will this change only cloth color? or both hair and cloth? and how about different hair and cloth color like (color #25 for hair and color#30 for cloth)It will change only the cloth color, but you can edit it to make it work as you may need: change cloth or hair color only, change both cloth and hair with the same color, or change both cloth and hair with different colors. To change hair color use "changelook 6" instead of "changelook 7". Please see the hercules documentation for script commands to see how does that scripts works (just search for *changelook in your browser). Thanks it works but i have problem regarding merging those getlook(7); and getlook(6); here's my item script regards that { callfunc "ChangeStyle",264,getlook(6); callfunc "ChangeStyle1",554,getlook(7); } somehow it manage to change only the hair color when i consumed the item the cloth color didn't change and how about the both hair color and cloth color with different values into 1 callfunc Edited February 4, 2015 by Reins Quote Share this post Link to post Share on other sites
0 Garr 117 Posted February 4, 2015 For that to work you need to edit the function itself. 1) Replace end with return; That way it'll change cloth color for a sec, and then change hair color for a sec. 2) If you need both at the same time you need to edit the function more, like this: function script ChangeStyle { changelook 7,getarg(0); changelook 6,getarg(2); dispbottom "Your cloth color has changed to "+getarg(0)+" and hair color to "+getarg(2); dispbottom "With a duration of a second, then your look will return to normal"; sleep2 1000; changelook 7,getarg(1); changelook 6,getarg(3); dispbottom "Your look has returned to normal."; end;} And, accordingly, change the call from item callfunc "ChangeStyle",554,getlook(7),264,getlook(6); 1 Reins reacted to this Quote Share this post Link to post Share on other sites
0 Reins 3 Posted February 4, 2015 (edited) For that to work you need to edit the function itself. 1) Replace end with return; That way it'll change cloth color for a sec, and then change hair color for a sec. 2) If you need both at the same time you need to edit the function more, like this: function script ChangeStyle { changelook 7,getarg(0); changelook 6,getarg(2); dispbottom "Your cloth color has changed to "+getarg(0)+" and hair color to "+getarg(2); dispbottom "With a duration of a second, then your look will return to normal"; sleep2 1000; changelook 7,getarg(1); changelook 6,getarg(3); dispbottom "Your look has returned to normal."; end;} And, accordingly, change the call from item callfunc "ChangeStyle",554,getlook(7),264,getlook(6); will try that asap wait! EDIT: Its ok now thanks guys! Edited February 4, 2015 by Reins Quote Share this post Link to post Share on other sites
Can someone tell me how to restore the old pallets on an item.. because I am using equipped and unequipped on an item. {},{ changelook 7,201 } { restore original pallet }
Share this post
Link to post
Share on other sites