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


RE: Dclick deed inside container - Dataline - 06-27-2014 09:35 PM

Hi kn4tseb, i'm from Spain.

i'm trying to create a deed which with dclick function inside a chest or box (not inside my backpack) do something.

i've tried setting can_i_dcignorelos flag in order to solve this, but doesn't work.

Then i was looking for google and i saw a post that said "can_i_dcignorelos is only for objects in world, not inside chest or box". Is it true?

I need another way to get this functionality.

Regards.


RE: Dclick deed inside container - kn4tseb - 06-28-2014 01:42 AM

which rev are you using?

check at your sphere_defs.scp file

can_i_dcignorelos 004000 // when dclicked, ignore los checks
can_i_dcignoredist 008000 // when dclicked, ignore distance checks

the message you are getting comes from this:
//reach_unable "You can't use this where it is."
so for some reason its unreachable, when you use it without container it works well right?


RE: Dclick deed inside container - sco - 06-28-2014 07:27 AM

Some itemtypes are doubleclickable in containers outside of your backpack, like books or other containers, but most of them are not.

There are some workarounds for that, but i prefer this one.
Enable Packetfiltering and add to your sphere.ini:
Code:
Packet6=f_precheck_dclick

And add a function to your scripts:
Code:
[function f_precheck_dclick]
return <uid.<hval (<local.1>*01000000)+(<local.2>*010000)+(<local.3>*0100)+<local.4>>.trigger @precheckdclick,<def.tat_as_args>,<local.char>>


Then add this trigger to your deed item:
Code:
[typedef t_always_dclickable]
on=@precheckdclick
trysrc <args> use 0
return 1



RE: Dclick deed inside container - Dataline - 06-28-2014 08:54 PM

Thanks for your replies kn4tseb and sco.

i'll try it. Big Grin


RE: Dclick deed inside container - Dataline - 06-29-2014 05:38 AM

It works!! Big Grin

Thanks a lot sco!