Kakita Yurasagi
Member
Greetings and thank you for the consideration and assistance.
I am attempting to create an Item (a wondrous Item for now,) that can be assigned to any Magic Item Slot via a drop-down bar. Getting the bar to appear is easy, just using the item selection option in the Editor. The difficulty lies in finding a suitable Eval Script that will assign the Chosen Item Slot to the Hero.
What I want is something that works very similar to the Magic Tattoos. However I do not wish to create a second set of phantom slots for this item. I want it to take up one of the actual Item Slots. If I select Shoulders, then equip a cloak, it should cause an error.
If someone could help me on what script is required to perform the assignment after the user chooses the field, I might be set.
the Script for tattoos looks like this:
	
	
	
		
But that is too specific to Tattoos, and I do not want to assign ExtraSlots.
I have the list of Slots. I have tried mimicking several scripts, without any success.
I believe I need some way of pulling the tag from [usrChosen1] then:
perform field[usrChosen1].chosen.assign[*Not Sure Wat to Put Here*]
I've messed with Hero.BaseMagicI , Component.ItemSlot , & seveal similar variations.
Perhaps a dirtier way is possible, by creating some kind of Matrix/Array with symbolic values, then using an If/Then to use the Values to assign the various Slots (isEqpBody, isEqpEyes, isEqpFoot, etc). However I'm not really sure how to configure that either.
Any advice is much appreciated.
				
			I am attempting to create an Item (a wondrous Item for now,) that can be assigned to any Magic Item Slot via a drop-down bar. Getting the bar to appear is easy, just using the item selection option in the Editor. The difficulty lies in finding a suitable Eval Script that will assign the Chosen Item Slot to the Hero.
What I want is something that works very similar to the Magic Tattoos. However I do not wish to create a second set of phantom slots for this item. I want it to take up one of the actual Item Slots. If I select Shoulders, then equip a cloak, it should cause an error.
If someone could help me on what script is required to perform the assignment after the user chooses the field, I might be set.
the Script for tattoos looks like this:
		PHP:
	
	[spoiler]
      perform field[usrChosen1].chosen.pulltags[ExtraSlot.?,Hero]
      perform forward[ExtraSlot.?]
and the eval rule for them like this: 
      ~Finished if nothing is selected
      validif (field[usrChosen1].ischosen = 0)
      var searchexpr as string
      var index as number
      searchexpr = "Custom.Tattoo & "
      index = 0
      searchexpr &= tagids[Hero.?]
      foreach pick in hero from BaseMagicI where searchexpr
        index += 1
        nexteach
      if (tagis[Hero.EqpRing] <> 0) then
        validif (index <= 2)
      else
        validif (index <= 1)
        endif
[/spoiler]But that is too specific to Tattoos, and I do not want to assign ExtraSlots.
I have the list of Slots. I have tried mimicking several scripts, without any success.
I believe I need some way of pulling the tag from [usrChosen1] then:
perform field[usrChosen1].chosen.assign[*Not Sure Wat to Put Here*]
I've messed with Hero.BaseMagicI , Component.ItemSlot , & seveal similar variations.
Perhaps a dirtier way is possible, by creating some kind of Matrix/Array with symbolic values, then using an If/Then to use the Values to assign the various Slots (isEqpBody, isEqpEyes, isEqpFoot, etc). However I'm not really sure how to configure that either.
Any advice is much appreciated.
