RanXerox 
Master
 
Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19
![]()
|
RE: @UnEquip
I don't see what the problem is.. I do the same thing using normal functions in @equip and @unequip ... for example:
Here are the items:
Code:
[ITEMDEF i_cap_work]
ID=i_skull_cap
NAME=work cap
DYE=1
RESOURCES=2 i_cloth,1 i_thread,i_wire_iron,i_potion_clever,i_scroll_strength
SKILLMAKE=Tailoring 30.1,t_sewing_kit,Magery 20.0
CATEGORY=Magic
SUBSECTION=Clothing
DESCRIPTION=Magic Work Cap
TAG.NotGargoyle=1
TAG.REQSTR=25
TEVENTS=e_equipitem //handle all the special tags
ON=@Create
HITPOINTS={36 48}
ATTR=attr_magic|attr_identified
TAG.ResFire=3
TAG.ResCold=5
TAG.ResPoison=8
TAG.ResPhysical=1
TAG.ResEnergy=8
ON=@UnEquip
WorkClothesUnequip
ON=@Equip
WorkClothesEquip
And here are the functions:
Code:
[FUNCTION WorkClothesEquip]
If (<SRC.FINDLAYER(6).baseid>==i_cap_work) && (<SRC.FINDLAYER(17).Baseid>==i_apron_work) && (<SRC.FINDLAYER(7).BaseID>==i_gloves_work) && (<SRC.FINDLAYER(3).Bas
eID>==i_boots_work)
SRC.MINING += 100
SRC.LUMBERJACKING += 100
SRC.MESSAGE You feel like working!
SRC.SOUND=snd_SPELL_BLESS
SRC.EFFECT=3,i_fx_bless_effect,6,16,0
Else
SRC.MINING += 20
SRC.LUMBERJACKING += 20
EndIf
[FUNCTION WorkClothesUnequip]
If (<SRC.FINDLAYER(6).baseid>==i_cap_work) && (<SRC.FINDLAYER(17).Baseid>==i_apron_work) && (<SRC.FINDLAYER(7).BaseID>==i_gloves_work) && (<SRC.FINDLAYER(3).Bas
eID>==i_boots_work)
SRC.MINING -= 100
SRC.LUMBERJACKING -= 100
SRC.MESSAGE You feel like resting...
SRC.SOUND=snd_SPELL_BLESS
SRC.EFFECT=3,i_fx_bless_effect,6,16,0
Else
SRC.MINING -= 20
SRC.LUMBERJACKING -= 20
EndIf
|
|
05-01-2013 01:25 AM |
|
|