golfin
Banned
Posts: 213
Likes Given: 2
Likes Received: 32 in 28 posts
Joined: Nov 2017
Eranova
|
RE: CanUse extension
For about 10 days, I've tried different ways to write this CanUse flag. It was not without success, but it was not what I wanted. So I resolved it differently. I use the ON=@EquipTest trigger directly on the subject. Can I keep the CanUse flag for the race. To enter a job, I placed the code directly to the subject using the function. See the following example. But you need to delete everything around CanUse in sphere_item_typedef_equipitem.scp and put it to the subject. TEVENTS=t_equipitem must be commented.
Code:
[ITEMDEF i_helm_swiftness]
ID=i_helm_winged
NAME=Helm of Swiftness
CanUse=can_u_elf
BonusInt=5
FasterCasting=1
FasterCastRecovery=2
RESPHYSICAL=6
RESFIRE=5
RESCOLD=6
RESPOISON=6
RESENERGY=8
MageArmor=1
//TEVENTS=t_equipitem
CATEGORY=Artifacts
SUBSECTION=Minor Artifacts
DESCRIPTION=Helm of Swiftness
ON=@Create
COLOR=0592
ATTR=attr_magic|attr_identified
HITPOINTS=255
ON=@EquipTest
IF ( ( (<CanUse>&can_u_elf) && !(<SRC.f_iself>) ) && !( (<CanUse>&can_u_human) && (<src.f_IsHuman>) ) )
IF <SRC.IsUndeclared>
SRC.SYSMESSAGELOC color_text,1070722,<def.can_use_warrior>
RETURN 1
ELSEIF <SRC.IsRanger>
SRC.SYSMESSAGELOC color_text,1070722,<def.can_use_warrior>
RETURN 1
ELSEIF <SRC.IsSorcerer>
SRC.SYSMESSAGELOC color_text,1070722,<def.can_use_warrior>
RETURN 1
ELSEIF <SRC.IsAlchemyst>
SRC.SYSMESSAGELOC color_text,1070722,<def.can_use_warrior>
RETURN 1
ELSEIF <SRC.IsThiev>
SRC.SYSMESSAGELOC color_text,1070722,<def.can_use_warrior>
RETURN 1
ENDIF
ENDIF
ON=@ClientToolTip
IF (<canuse> &can_u_elf) && !((<canuse>&can_u_human) || (<canuse>&can_u_gargoyle))
SRC.ADDCLILOC 1075086
ENDIF
src.addcliloc=1070722,<def.only_warrior>
This works smoothly as I wanted to * Smile *
Even though, I will have multiple rows in scripts.
Well, I thought, I will try to create [TYPEDEF t_equipitem] for all jobs separately. [TYPEDEF t_equipitem_warrior], [TYPEDEF t_equipitem_ranger] and so on ... It will come out * smile *
Yes and it works well as a separate typedef, heurekaa
(This post was last modified: 10-25-2018 05:06 AM by golfin.)
|
|
10-25-2018 04:35 AM |
|
|