on=@click
if (<attr>&(attr_identified))
src.sysmessage @026 Item Rank: Artifact
src.sysmessage @026 Skill: Blacksmithing +100.0
message @026 The Golden Hammer
Return 1 // <- here is the right place.
endif
if it got att identified it will show thoose informations otherwise it will show only normal name. You dont need to check attr magic. It's still got that magic attr after identify.
ON=@Equip
if (<attr>&(attr_identified))
src.blacksmithing = (<src.blacksmithing>+1000)
endif
And same unequip. If item is identified, it gives bs on @equip and take back bs if only identified. But still it cause a major bug, if player use that hammer before identify and if he use itemid while using hammer, he will loose 100.0 bs when he unequip it cuz while equip that item wasnt identified and then he identified item and unequip it. Puff a bug
You can solve this problem with two ways, 1st save players blacksmithy skill with tags, while unequip check that varies ( <<skillcurently> - 1000> != <skillbeforehammer> ) like this. And 2nd way do not allow use that hammer before it got identified. But i think you more like 1st way.
on @equip
src.tag.bs <src.blacksmithy> // <- it must be in here before you give player to more skill.
if (<attr>&(attr_identified))
src.blacksmithing = (<src.blacksmithing>+1000)
endif
on @unequip
if (<attr>&(attr_identified))
if (<eval <src.blacksmithy> - 1000> == <src.tag0.bs> ) // <- I choose check equality but if your skill cap is higher than 100.0 use "<" this one.
src.blacksmithing = (<src.blacksmithing>+1000)
endif
endif
src.cleartags bs //<- clearing tag.
With this way you save players bs at first time. And while unequip if current bs -1000 is equal with before using hammer, it will drop bs otherwise it will not. And it will works only if you have 100.0 skillcap otherwise you have to check ( if (<eval <src.blacksmithy> - 1000> < <src.tag0.bs> ) like this. Grts.