SphereCommunity
Vendor double click - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Vendor double click (/Thread-Vendor-double-click)



Vendor double click - eddiedean - 02-12-2014 02:37 AM

Hi,

I want all my vendors to open its 'buy' menu when I double click them, not when I say 'buy'.

Is there anyway to get this?

Thanks.


RE: Vendor double click - Shidhun - 02-12-2014 02:53 AM

[events e_vendor_buy]
on=@dclick
IF (<DISTANCE>>4)
RETURN 1
ENDIF
buy


// Put this on every Vendor-Chardef
TEVENTS=e_vendor_buy


RE: Vendor double click - mrkarlo - 02-12-2014 05:56 AM

dialog d_buy maybe, after IF (<DISTANCE>>4)


RE: Vendor double click - eddiedean - 02-19-2014 05:38 AM

Thanks!


RE: Vendor double click - JohnVeritas - 02-19-2014 09:48 AM

Code:
[events e_vendor_buy]
on=@dclick
if (<src.hits> <= 0)
src.sysmessage You can't do it while you're dead.
return 1
elseif (<DISTANCE><4)
src.sdialog d_blahblah // try sdialog
src.ctag.shoppernpc <uid>
return 1
ENDIF


[dialog d_blahblah button]

on=1//buy button
ref1 = <src.ctag.shoppernpc>
if (<ref1.distance> > 4)
src.sysmessage You're too far away from the vendor.
else
blah
blah
buy
endif

If vendor sell things via custom dialogs you must check player lives or dead, how far away from vendor and how many dialogs that player opened. They can buy items while dead, or far far away from vendor. GRTS