SphereCommunity
Dye Tubs - Printable Version

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



Dye Tubs - dabritmusic - 02-17-2014 07:21 AM

hen creating dye tubs, how would you make it a random color. ive been tryin everyhting lol and can seem to figure it out.

ON=@CREATE
COLOR={007ba,007bb,007bc,007bd,007be}


RE: Dye Tubs - mrkarlo - 02-17-2014 08:43 AM

hey, you can try this:

Code:
[FUNCTION f_colors]
DORAND 03
COLOR=01
COLOR=02
COLOR=03

Code:
[ITEMDEF i_dye_tube]
On=@Create
f_colors



RE: Dye Tubs - XuN - 02-17-2014 09:04 AM

ON=@CREATE
COLOR={007ba 1 007bb 1 007bc 1 007bd 1 007be 1}


RE: Dye Tubs - dabritmusic - 02-17-2014 09:30 AM

(02-17-2014 08:43 AM)mrkarlo Wrote:  hey, you can try this:

Code:
[FUNCTION f_colors]
DORAND 03
COLOR=01
COLOR=02
COLOR=03

Code:
[ITEMDEF i_dye_tube]
On=@Create
f_colors

this makes the client crash when its done this way...

Thanks XUN that what i was looking for. i could remembr it being something like that. its just been so many years...


RE: Dye Tubs - Runcuks - 02-17-2014 04:33 PM

[FUNCTION AMAZINGCOLOR]
DORAND 19
COLOR=04ad
COLOR=1
COLOR=042b
COLOR=1152
COLOR=09dd
COLOR=0613
COLOR=0898
COLOR=0a28
COLOR=0a27
COLOR=0834
COLOR=04af
COLOR=0449
COLOR=0446
COLOR=0447
COLOR=08ef
COLOR=091d
COLOR=0444
COLOR=0912
COLOR=0487
ENDDO

[ITEMDEF i_amazing_color]
ID=i_dye_tub
NAME=Amazing Color
TYPE=T_NORMAL
WEIGHT=1
VALUE=500


ON=@CREATE
ATTR=04
AMAZINGCOLOR

ON=@DCLICK
target Select cloth to dye
return 1

on=@targON_char
src.sysmessage @50 It is not cloth.
return 1

On=@targon_ground
src.sysmessage @50 It is not cloth.
return 1

on=@targON_item
if (<SRC.TARG.CONT.CONT.UID>!=<SRC.UID>)
src.sysmessage @50 You must select cloth what is in your backpack.
return 1
else
if (<src.targ.amount> > 1)
src.sysmessage @50 Only for 1 <src.targ.name>
return 1
else
if (<src.targ.type>==t_clothing)
src.targ.color=<color>
src.sysmessage @53 You have successfully dyed your cloth.
f_amount
return 1
endif


RE: Dye Tubs - Alaric - 02-17-2014 05:41 PM

ON=@CREATE
COLOR=<eval rand(07ba,07be)>

Hope it's correct. I didn't try it.


RE: Dye Tubs - JohnVeritas - 02-19-2014 09:50 AM

(02-17-2014 09:04 AM)XuN Wrote:  ON=@CREATE
COLOR={007ba 1 007bb 1 007bc 1 007bd 1 007be 1}

This works and way shorter than others.


RE: Dye Tubs - dabritmusic - 02-19-2014 09:56 AM

yes thats what XUN replied. works great. thanks alot tho man