Radian
New member
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 }
OnEquipScript: <" previouspal = getlook(7); changelook 7,201; "> OnUnequipScript: <" changelook 7,previouspal; ">
thanks for this!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; ">
You can try calling a function to do that. Maybe trying with the next example you can get it:thanks for this!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; ">
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:thanks for this!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; ">
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
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.
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.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)
Thanks it works but i have problem regarding merging those getlook(7); and getlook(6);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.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)
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).
callfunc "ChangeStyle",554,getlook(7),264,getlook(6);
will try that asap wait!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);
We use essential cookies to make this site work, and optional cookies to enhance your experience.