SphereCommunity
ON=@ItemDropOn_Ground - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: ON=@ItemDropOn_Ground (/Thread-ON-ItemDropOn-Ground--4211)



ON=@ItemDropOn_Ground - ForesteR - 06-13-2015 05:11 AM

this trigger is working except the ACT.CONT=<SRC.FINDLAYER.29> || ACT.CONT=<SRC.FINDLAYER.21> isnt working in last nightly build, someone know what about?

ON=@ItemDropOn_Ground
IF (<ACT.BASEID>==i_book_vip) || (<ACT.BASEID>==i_robe_vip)
SRC.SYSMESSAGEUA 07a1,0,0,0 <ACT.NAME> nao pode ser jogado no chao.
IF (<SRC.WEIGHT> > <SRC.MAXWEIGHT>)
ACT.CONT=<SRC.FINDLAYER.29>
SRC.SYSMESSAGEUA 07a1,0,0,0 <ACT.NAME> foi para seu bank pq vc estar muito pesado.
RETURN 1
ENDIF
ACT.CONT=<SRC.FINDLAYER.21>
RETURN 1
ENDIF


Anothers triggers like ON=@ItemDropOn_Item is working perfecly!


RE: ON=@ItemDropOn_Ground - Skul - 06-16-2015 09:42 AM

That happens because sending CONT does not update the container of the item unless the container is opened. There are little work arounds for it, such as sending the item under ground prior to changing it's CONT. Example:
Code:
on=@itemdropon_ground
if (<act.baseid>==i_book_vip) || (<act.baseid>==i_robe_vip)
  src.sysmessageua 07a1,0,0,0 <act.name> nao pode ser jogado no chao.
  if (<src.weight> > <src.maxweight>)
    act.z=<eval <serv.map(<act.p.x>,<act.p.y>,<act.z>,<act.map>).terrain.z> +-20> //send underneath the floor to hide the object
    act.cont=<src.findlayer.29>
    src.sysmessageua 07a1,0,0,0 <act.name> foi para seu bank pq vc estar muito pesado.
  else
    act.z=<eval <serv.map(<act.p.x>,<act.p.y>,<act.z>,<act.map>).terrain.z> +-20> //send underneath the floor to hide the object
    act.cont=<src.findlayer.21>
  endif
  return 1
endif



RE: ON=@ItemDropOn_Ground - ForesteR - 06-16-2015 10:04 AM

don't work... i tryed to put a new position ( p=1419,1696 ) for item and don't work ...


RE: ON=@ItemDropOn_Ground - ForesteR - 06-17-2015 09:54 AM

Make a trick with timer and work

suggestions?

PHP Code:
[TYPEDEF t_e_items_vip]

ON=@DropOn_Ground
IF !<TAG.UID>
    
TAG.UID=<SRC.UID>
ENDIF
TIMER=0

ON
=@PickUp_Ground
REF1
=<TAG.UID>
IF (<
REF1.WEIGHT> > <REF1.MAXWEIGHT>)
    
CONT=<REF1.FINDLAYER.layer_bankbox>
    
REF1.SYSMESSAGE <NAMEfoi para seu bank pq vc estar muito pesado.
    RETURN 
1
ENDIF
CONT=<REF1.FINDLAYER.layer_pack>
RETURN 
1

ON
=@DropOn_Item
REF1
=<TAG.UID>
IF (<
ARGO>!=<REF1.FINDLAYER(21).UID>)
    IF (<
REF1.WEIGHT> > <REF1.MAXWEIGHT>)
        
CONT=<REF1.FINDLAYER.layer_bankbox>
        
REF1.SYSMESSAGE <NAMEfoi para seu bank pq vc estar muito pesado.
        RETURN 
1
    
ENDIF
    
REF1.SYSMESSAGE <NAMEnao pode ser transferido de sua bag.
    
CONT=<REF1.FINDLAYER.layer_pack>
    RETURN 
1
ENDIF

ON=@DropOn_Char
REF1
=<TAG.UID>
IF (<
REF1.WEIGHT> > <REF1.MAXWEIGHT>)
    
REF1=<REF1.FINDLAYER.layer_bankbox>
    
REF1.SYSMESSAGE <NAMEfoi para seu bank pq vc estar muito pesado.
    RETURN 
1
ENDIF
REF1.SYSMESSAGE <NAMEnao pode ser trocado.
CONT=<REF1.FINDLAYER.layer_pack>
RETURN 
1

ON
=@TIMER
REF1
=<TAG.UID>
IF (<
REF1.WEIGHT> > <REF1.MAXWEIGHT>)
    
CONT=<REF1.FINDLAYER.layer_bankbox>
    
REF1.SYSMESSAGE <NAMEfoi para seu bank pq vc estar muito pesado.
    RETURN 
1
ENDIF
CONT=<REF1.FINDLAYER.layer_pack>
REF1.SYSMESSAGE <NAMEnao pode ser jogado no chao.
RETURN