SphereCommunity
Help script de Paint item - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Help script de Paint item (/Thread-Help-script-de-Paint-item)



Help script de Paint item - victorstelzer - 06-26-2012 10:49 AM

[ITEMDEF i_tinta_vulcan]
ID=I_reag_dragon_blood
DEFNAME=i_tinta_vulcan
NAME=Tinta True Vulcan
WEIGHT=2
CATEGORY=Tintas True
SUBSECTION=Tintas
DESCRIPTION=Tinta Vulcan

ON=@Create
COLOR=0f93


ON=@Dclick

need to click it 2 paint the selected item ?? how to make???


RE: Help script de Paint item - Gil Amarth - 06-26-2012 06:51 PM

ON=@DCLICK
TARGET What item do you want to color?
RETURN 1

ON=@TARGON_ITEM
SRC.TARG.COLOR = <COLOR>
RETURN 1


RE: Help script de Paint item - victorstelzer - 06-27-2012 08:57 AM

Good evening friend Gil Amarth, is helping me make

When you paint the item, the scrip consume the item?

As would be to consume the item


/////////////TINTA VULCAN ///////////////

[ITEMDEF i_tinta_vulcan]
ID=I_reag_dragon_blood
DEFNAME=i_tinta_vulcan
NAME=Tinta True Vulcan
WEIGHT=2
CATEGORY=Tintas True
SUBSECTION=Tintas
DESCRIPTION=Tinta Vulcan

ON=@Create
COLOR=0f93

ON=@DCLICK
TARGET What item do you want to color?
RETURN 1


ON=@TARGON_ITEM
SRC.TARG.COLOR = 0f93
RETURN 1
consume 1 i_tinta_vulcan
return 1

[EOF]


RE: Help script de Paint item - Skul - 06-27-2012 09:00 AM

The item should REMOVE since it can be used from the floor, also look at the <amount> and remove the appropriate amount.

Example:
Code:
if (<amount> > 1)
amount -= 1
update //update the amount
else
remove //remove the item entirely since the amount is 1 or less
endif
return 1 //halt default processing.



RE: Help script de Paint item - victorstelzer - 06-27-2012 09:05 AM

Did not work well? As would be oo


[ITEMDEF i_tinta_vulcan]
ID = I_reag_dragon_blood
Defname = i_tinta_vulcan
NAME = True Vulcan Ink
WEIGHT = 2
Paints CATEGORY = True
Paints SubSection =
DESCRIPTION = Vulcan Ink

ON = @ Create
COLOR = 0f93

ON = @ DCLICK
TARGET What item do you want to color?
RETURN a



ON = @ TARGON_ITEM
SRC.TARG.COLOR = 0f93
RETURN a

if (<amount>> 1)
amount - = 1
update / / update the amount
else
remove / / remove the item Entirely since the amount is 1 or less
endif
return 1 / / default halt processing.


RE: Help script de Paint item - Extreme - 06-27-2012 09:28 AM

Just one question, are you brazillian Victor?
Code:
[ITEMDEF I_TINTA_VULCAN]
ID I_REAG_DRAGON_BLOOD
NAME True Vulcan Ink
WEIGHT 2

ON=@Create
COLOR 0F93

ON=@DCLICK
IF <TOPOBJ> != <SRC>
SRC.SYSMESSAGE @,,1 Put the <NAME> in your backpack.
RETURN 1
ENDIF
TARGET What item do you want to color?
RETURN 1

ON=@TARGON_ITEM
IF <SRC.TARG.TOPOBJ> != <SRC>
SRC.SYSMESSAGE @,,1 Put the <SRC.TARG.NAME> in your backpack.
RETURN 1
ENDIF
SRC.TARG.COLOR <COLOR>
AMOUNT -= 1
IF <AMOUNT> == 0
REMOVE
ENDIF
RETURN 1

ON=@TARGON_CHAR
RETURN 1
ON=@TARGON_GROUND
RETURN 1



RE: Help script de Paint item - victorstelzer - 06-27-2012 09:48 AM

Thanks for the help, Extrem, Gil Amarth, Skul

Now the script worked correctly.