SphereCommunity
Shrink - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Shrink (/Thread-Shrink--3076)



Shrink - Runcuks - 12-12-2013 04:30 AM

Hi, Could someone tell me how to add tag to creature that just have been opened from shrink ?

Sorry for bad english. Sad


RE: Shrink - Wap - 12-12-2013 04:58 AM

[TYPEDEF t_figurine]
ON=@DClick
?

But there is needed a check, that creature is really unshrinked.


RE: Shrink - XuN - 12-12-2013 05:02 AM

More2 in t_figurine is the UID of the shrinked char, so creating the tag on this UID will do it.


RE: Shrink - Runcuks - 12-12-2013 06:05 AM

Wap yup with
[TYPEDEF t_figurine]
ON=@DClick


XuN could you script that part for me coz i didnt understand it right, atleast it didnt worked for me Sad


RE: Shrink - Wap - 12-12-2013 06:35 AM

Code:
[TYPEDEF t_figurine]
ON=@DClick
IF <UID.<MORE2>>
    UID.<MORE2>.TAG.TEST=1
ENDIF

But it also may add tag, if char double click, but can't re-shrink the pet.


RE: Shrink - Runcuks - 12-12-2013 10:41 PM

more2 uid is the creatures uid before shrink, after open shrinked creature its uid change's Sad


RE: Shrink - Wap - 12-12-2013 11:31 PM

(12-12-2013 10:41 PM)Runcuks Wrote:  more2 uid is the creatures uid before shrink, after open shrinked creature its uid change's Sad
By default - it doesn't.


RE: Shrink - Runcuks - 12-12-2013 11:38 PM

Oh yeah test it with .shrink, could you please share your shrink potion script becouse my is not working that way Sad


RE: Shrink - Wap - 12-12-2013 11:59 PM

Code:
[ITEMDEF i_potion_Shrink]
DEFNAME=i_potion_Shrink
ID=i_bottle_WHITE
NAME=Shrink
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_batwing 5, i_bottle_EMPTY
SKILLMAKE=ALCHEMY 120.0

ON=@Create
    MORE1=s_shrink
    MORE2=100.0
    COLOR=color_gray_lt

ON=@DropON_Char
IF (<TOPOBJ> == <SRC.UID>)
  IF !(<ARGO.ISPLAYER>)
     IF (<ARGO.ISMYPET>)
       IF (<ARGO.DISTANCE> < 4)
    IF (<ARGO.TAG0.SUMMON>)
        ARGO.SPELLEFFECT s_dispel,1000
    ELSE
        ARGO.NAME=<SERV.CHARDEF.<ARGO.BASEID>.NAME>
        ARGO.SHRINK
        ARGO.SHRINKTOPACK <SRC.UID>
    ENDIF
    CONSUME 1
    TRYSRV SERV.NEWITEM i_bottle_empty
    NEW.BOUNCE
    RETURN 1
       ELSE
    SRC.MES_AWAY
       ENDIF
     ELSE
       SRC.MES_NOMYPET
     ENDIF
  ELSE
     SRC.MES_NOMYPET
  ENDIF
ENDIF

ON=@TargON_Char
IF (<TOPOBJ> == <SRC.UID>)
  IF !(<ARGO.ISPLAYER>)
     IF (<ARGO.ISMYPET>)
       IF (<ARGO.DISTANCE> < 4)
    IF (<ARGO.TAG0.SUMMON>)
        ARGO.SPELLEFFECT s_dispel,1000
    ELSE
        ARGO.NAME=<SERV.CHARDEF.<ARGO.BASEID>.NAME>
        ARGO.SHRINK
        ARGO.SHRINKTOPACK <SRC.UID>
    ENDIF
    CONSUME 1
    TRYSRV SERV.NEWITEM i_bottle_empty
    NEW.BOUNCE
    RETURN 1
       ELSE
    SRC.MES_AWAY
       ENDIF
     ELSE
       SRC.MES_NOMYPET
     ENDIF
  ELSE
     SRC.MES_NOMYPET
  ENDIF
ENDIF

ON=@TargON_Item
SRC.MES_NOMYPET
RETURN 1

on=@dclick
IF (<TOPOBJ> == <SRC.UID>)
  target="What do you want to shrink?"
  return 1
ENDIF
RETURN 1

[FUNCTION SHRINKTOPACK]
FORITEMS 0
    IF (<TYPE> == t_figurine)
    TRYSRC <ARGV[0]> BOUNCE
    ENDIF
ENDFOR
RETURN 1



RE: Shrink - Runcuks - 12-13-2013 06:02 AM

Thanks you very much Wap Smile