SphereCommunity
Dclick deed inside container - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Dclick deed inside container (/Thread-Dclick-deed-inside-container)

Pages: 1 2


Dclick deed inside container - Dataline - 06-24-2014 12:22 AM

Hi all, i'm new here.

i'have created a comfort deed to insert lingots, reagents, ores, etc...

i try to get resources from deed inside a container (box, chest, etc...) but i can't. When i do dclick on deed, a message "You can't use this where it is" appears.

Any idea?

Thanks a lot.


RE: Dclick deed inside container - Extreme - 06-24-2014 04:14 AM

Welcome Dataline!

Please post your script here.


RE: Dclick deed inside container - Dataline - 06-24-2014 04:39 AM

Hi Extreme, thanks for your reply

here is code:

Code:
////////////////////////////////////////////////////////////////////////////////////////////////
// Cheque de comodidad
////////////////////////////////////////////////////////////////////////////////////////////////
[ITEMDEF i_cheque_comodidad]
NAME=Deed de Comodidad
ID=i_deed
TYPE=T_NORMAL
VALUE=100
weight = 1

CATEGORY=Objetos
SUBSECTION=Varios
DESCRIPTION=Cheque de comodidad

on=@create
NAME=Deed de Comodidad
Color=00
TAG.COMODIDAD=0

on=@dclick
if !(<cont>==<src.findlayer(21).uid>) && (<TAG0.COMODIDAD>==0)
        Src.message Debes tener el deed en la mochila para poder usarlo.
        return 1
elseif !(<cont>==<src.findlayer(21).uid>) && (<TAG0.COMODIDAD>==1)
        src.sysmessage=Obtienes <eval(<TAG.COMODIDADAMOUNT>)> de <TAG.COMODIDADNAME>.
        serv.newitem=<TAG.COMODIDADID>
        new.amount=<TAG.COMODIDADAMOUNT>
        COLOR=<TAG.COMODIDADADCOLOR>
        NEW.CONT=<cont>
        REMOVE
        return 1
elseif (<TAG0.COMODIDAD>==0)
        TARGET=Que deseas introducir?
        RETURN 1
//elseiF (<src.region.flags>==01192) || (<src.region.flags>==01092) &&
elseif (<TAG.COMODIDAD>==1)
        src.sysmessage=Obtienes <eval(<TAG.COMODIDADAMOUNT>)> de <TAG.COMODIDADNAME>.
        serv.newitem=<TAG.COMODIDADID>
        new.amount=<TAG.COMODIDADAMOUNT>
        COLOR=<TAG.COMODIDADADCOLOR>
        NEW.CONT=<SRC.FINDLAYER(21).UID>
        REMOVE
        return 1
else
        src.sysmessage=Hay problemas con este Deed de comodidad, avisa al Staff.
        Return 1
endif

when i do double click on deed inside a chest or box it's the problem.


RE: Dclick deed inside container - Extreme - 06-24-2014 05:50 AM

This:
!(<cont>==<src.findlayer(21).uid>)

Prevents you to use outside from your backpack. Remove it and it should work.


RE: Dclick deed inside container - Dataline - 06-24-2014 06:04 AM

Thanks for reply again,

The problem is when a deed is inside a box blocked/secure on the floor.

When i tried to do double click on a object inside, the sysmessage shows "You can't use this where it is".


RE: Dclick deed inside container - Extreme - 06-24-2014 08:50 AM

(06-24-2014 05:50 AM)Extreme Wrote:  This:
!(<cont>==<src.findlayer(21).uid>)

Prevents you to use outside from your backpack. Remove it and it should work.



RE: Dclick deed inside container - XuN - 06-24-2014 05:07 PM

You cannot double click items outside your LOS or Distance, the @DClick trigger is fired after some internal checks, what you can do is to open sphere_msgs.scp, search for this text and translating it.


RE: Dclick deed inside container - Dataline - 06-24-2014 06:01 PM

Thanks for your reply Xun,

is there any way to make this functionallity without dclick?

Regards.


RE: Dclick deed inside container - Dataline - 06-25-2014 06:48 PM

Well, i've seen this configuration in ITEMDEF:

[itemdef i_test]
id=i_pickaxe
name=Pickaxe
can=can_i_dcignorelos

But doesn't work. Cry


RE: Dclick deed inside container - kn4tseb - 06-27-2014 03:13 PM

Welcome Dataline, first at all, where r u from?

can_i_dcignorelos 004000 // this flag actually exists, but never tried it before

explain your self a bit better, you want the deed to work only if it's inside your backpack.
the chests or boxes are containers inside your backpack?