SphereCommunity
NPC does not drink potion. and invisible spell problems - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: NPC does not drink potion. and invisible spell problems (/Thread-NPC-does-not-drink-potion-and-invisible-spell-problems)

Pages: 1 2


NPC does not drink potion. and invisible spell problems - Satvet - 05-10-2018 10:41 AM

In the 56b version, over NPCs in when I left the potions on the they were drinking.
why does not this feature now? or how can I activate this feature?

the player becomes invisible with Invisible (An Lor Exen) magic.
and then pass from inside another player or NPC the invisibility is degraded
Build Version: 528. 56d-Nightly



RE: NPC does not drink potion. and invisible spell problems - darksun84 - 05-10-2018 05:37 PM

I am sure that NPCs never drank potion without the use of some scripts


RE: NPC does not drink potion. and invisible spell problems - Satvet - 05-11-2018 12:54 AM

I think you are wrong.
player character with would you try to drop a potion on a wounded ANIMAL. with the empty 56b package. it she works here.



RE: NPC does not drink potion. and invisible spell problems - azmanomer - 05-11-2018 01:58 AM

for invis u can add event to players like;

on @personalspace

if <findlayer.39>
return 1
endif


for temporary solution. if you want to achive it from scripts there will be work around i think changing it from source is better idea.


RE: NPC does not drink potion. and invisible spell problems - Satvet - 05-11-2018 04:58 AM

@azmanomer
thanks for the suggestion but I tried it.
it does not pass through. .:/



RE: NPC does not drink potion. and invisible spell problems - Coruja - 05-12-2018 07:04 AM

honestly I don't remember exactly the 56b behavior because last time I used 56b was 5 years ago

but I think the correct behavior is as it is now, if you drop an item over an pet, it should just try to place it on backpack (if it have an backpack) instead try to use the item

but anyway, to make pets invisible you can just cast Invisibility spell on the pet, or add an custom trigger @DropOn_Char on the invisibility potion to "activate" it when it got dropped over the pet


RE: NPC does not drink potion. and invisible spell problems - Satvet - 05-17-2018 07:34 AM

@Coruja
I think it was misunderstood. @DropOn_Char for I mean that, If you want to use 56d console, you can take an example
to an event on the character add


PHP Code:
[ITEMDEF I_POTION_COOLDOWN_ANIMAL]
DEFNAME=I_POTION_COOLDOWN_ANIMAL
ID
=I_MEMORY
ATTR
=ATTR_DECAY
TYPE
=T_EQ_SCRIPT
LAYER
=LAYER_SPECIAL

ON
=@TIMER
REMOVE
RETURN 1

ON
=@ITEMDROPON_CHAR
//- ARGO = Binek (ANIMAL)
//- ACT = Üzerine bırakılan obje (ITEM)
//- SRC = İşlem yapan kişi (CHAR)
IF (<ARGO.ISEVENT.E_ANIMALS>)
IF (<
ARGO.FINDID.I_POTION_COOLDOWN_ANIMAL>)
SRC.SYSMESSAGE @048,,1 Bu kadar hızlı iksir içmesi hiç iyi değil//- Drinking such fast potions is not good!
RETURN 1
ELSE
IF (<
ARGO.HITS> >= <ARGO.STR>)
SRC.SYSMESSAGE @48,,1 Sağlığı gayet iyi durumdaDaha fazla iksir içemez miğdesini bulandırabilir//- The health is fine! More potions absent the drinking. / The health is fine! More potions can make sick.
RETURN 1
ELSE
IF (<
ACT.BASEID> == I_POTION_HEALGREAT) && (<ARGO.HITS> < <ARGO.STR>)
IF (<
ACT.AMOUNT> >= 2)
SERV.NEWITEM=I_POTION_HEALGREAT,<EVAL <ACT.AMOUNT> -1>,<SRC>
SERV.NEWITEM=I_BOTTLE_EMPTY,1,<ARGO>
ARGO.EFFECT=3,I_FX_HEAL_EFFECT,6,19,
ARGO
.HITS=+={25 50}
ACT.REMOVE
DORAND 2
ARGO
.ANIM=5
ARGO
.ANIM=6
ENDDO
SERV
.NEWITEM=I_POTION_COOLDOWN_ANIMAL,1,<ARGO>
NEW.
LINK=<ARGO>
NEW.
TIMER=14
NEW.ATTR=06
RETURN 1
ELSE
SERV.NEWITEM=I_BOTTLE_EMPTY,1,<ARGO>
ARGO.EFFECT=3,I_FX_HEAL_EFFECT,6,19,
ARGO
.HITS=+={25 50}
ACT.REMOVE
DORAND 2
ARGO
.ANIM=5
ARGO
.ANIM=6
ENDDO
SERV
.NEWITEM=I_POTION_COOLDOWN_ANIMAL,1,<ARGO>
NEW.
LINK=<ARGO>
NEW.
TIMER=14
NEW.ATTR=06
RETURN 1
ENDIF //- (<ACT.AMOUNT> >= 2)
ENDIF //- (<ACT.BASEID> == I_POTION_HEALGREAT) && (<ARGO.HITS> < <ARGO.STR>)
ENDIF //- (<ARGO.HITS> >= <ARGO.STR>)
ENDIF //- (<ARGO.FINDID.I_HANDR_1>)
ENDIF //- (<ARGO.ISEVENT.E_ANIMALS>) 


watch the video for invisibility spell
the video


RE: NPC does not drink potion. and invisible spell problems - Coruja - 05-17-2018 04:54 PM

so you're talking about the reveal, not the invisibility spell cast?

to avoid reveal invisible chars when walk over him you can use @PersonalSpace trigger, setting ARGN1=0 will make the trigger skip dex/stamina/reveal checks, so you just need to check if (<FLAGS> & statf_invisible) -> set ARGN1=0


RE: NPC does not drink potion. and invisible spell problems - Satvet - 05-18-2018 03:55 AM

It does not work;
Quote:ON=@PersonalSpace
IF (<FLAGS>&Statf_Invisible)
ARGN1=0
ENDIF



RE: NPC does not drink potion. and invisible spell problems - Coruja - 05-18-2018 05:30 AM

my fault, ARGN1=0 will just make the char walk over without check dex or lose stamina. To skip all checks and messages (including hidden/invisible flags) you must set ARGN1=-1