![]() |
Dragdrop ID - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Dragdrop ID (/Thread-Dragdrop-ID) |
Dragdrop ID - MuteUme - 09-13-2017 12:14 AM Well, im checkin some scroll & potion cases and wondering if u guys have some ideas on how to drag and drop items into books/cases instead of opening them or clickin dialog buttons. I mean, common scripts usually use a dialog button for adding items once u opened the book/case, like this: if (<src.targ.baseid>=i_reag_black_pearl) more1=<tag.reg1> more2=<src.targ.amount> tag.reg1=<more1>+<more2> src.sysmessage Pones <eval(<more2>)> You put black pearl in your case src.consume <more2> i_reag_black_pearl DIALOG d_reg_case return 1 endif But im tryin to figure out how can i drag&drop (in this case Black pearls) on the book/case in the backpack. Thanks for helping me. RE: Dragdrop ID - darksun84 - 09-13-2017 12:55 AM You can assign the type t_container to the item and using variuos triggers: ON=@Dclick You can prevent the container to be opened in the normal way. ON=@DropOn_Self You can check what items can be added to the container. Also containers type have the following properties, see: http://wiki.spherecommunity.net/index.php?title=Special_Items#Containers The only drawback is that the items inside this container will be still sellable. The Runebook in Soulless shard was made in this way. RE: Dragdrop ID - MuteUme - 09-13-2017 03:36 AM (09-13-2017 12:55 AM)darksun84 Wrote: You can assign the type t_container to the item and using variuos triggers: Yup, solved it easily. ![]() Dint find the suitable TAG for some reason, thx again buddy ^^ |