SphereCommunity
T_DRINKS fix - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: T_DRINKS fix (/Thread-T-DRINKS-fix)



T_DRINKS fix - kn4tseb - 08-28-2014 06:14 AM

Well guys, most of you must know this but in case you dont i put it here..

when you drink a T_DRINK item the TDATA1 is created but it doesnt keep the MOREM of the first object... so if you drink a glass of water or a pitcher
when first time created it gets the MOREM set in the script file but when you dclick it and target it on a T_WATER_WASH to "fill it up" the new glass of water of pitcher will not have any MOREM so no "drinking" or "food" points are restored...

that would be it..
Thank you very much.

PD: i created a function to fix this but i think would be better if it's hardcoded in the future ^^
Thanks

PD2: i dont know if i should report it as a bug...

Regards.


RE: T_DRINKS fix - Extreme - 08-28-2014 07:08 AM

Hmm, I understand BUT you fixed it with a softcode and it is enough.
Many things sometimes can't be hardcoded because every scripter have your ideas and hardcoding it will force them to have limitations.

You can share your fix here Big Grin


RE: T_DRINKS fix - kn4tseb - 08-28-2014 11:55 AM

i just added a quick simply function for both items:
Code:
[ITEMDEF 09a7]
DEFNAME=i_pitcher_glass
BLA ...

ON=@Dclick
TARGETF TURNINGWATERPITCHER <UID>
RETURN 1

[FUNCTION TURNINGWATERPITCHER]
REF1 = <ARGO>
REF2 = <ARGS>
IF <REF1.TYPE> == T_WATER_WASH
SERV.NEWITEM i_pitcher_water
NEW.MOREM = 3
IF (<REF2.TOPOBJ.ISCONT>
NEW.BOUNCE
ELSE
NEW.P <REF2.P>
ENDIF
REF2.REMOVE
ENDIF

same for
[ITEMDEF 01f81]
DEFNAME=i_glass