local setting = event_halloween_hair . setting ( ) 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _70_say ) 
wait ( ) 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _80_say ) 
wait ( ) 
if pc . count_item ( setting . coupon ) == 0 then 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _90_say ) 
wait ( ) 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _100_say ) 
wait ( ) 
else 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _110_say ) 
wait ( ) 
say_title ( gameforge . event_halloween_hair . _20_sayTitle ) 
say ( gameforge . event_halloween_hair . _120_say ) 
wait ( ) 
say ( gameforge . event_halloween_hair . _130_say ) 
local s = select ( gameforge . event_halloween_hair . _140_select_1 , gameforge . event_halloween_hair . _140_select_2 ) 
if s == 2 then 
return 
end 
pc . remove_item ( setting . coupon , 1 ) 
local race = pc . get_race ( ) + 1 
local index = event_halloween_hair . get_random_hair_option_index ( ) 
local option = event_halloween_hair . get_hair_option ( index ) 
local hair_info = event_halloween_hair . get_hair_info_by_race ( race ) 
local vnum , shape = hair_info [ 1 ] , hair_info [ 2 ] 
pc . give_item2_select ( vnum ) 
item . set_socket ( 0 , option . duration ) 
item . set_value ( 0 , option . apply , option . value ) 
end 
if not event_halloween_hair . is_running ( ) then 
npc . purge ( ) 
end 
